diff --git a/lib/social.js b/lib/social.js index 3d20e84..fc67803 100644 --- a/lib/social.js +++ b/lib/social.js @@ -102,9 +102,9 @@ function awardWeek(monday) { const done = store.read('prizes', []); if (done.some(x => x.week === monday)) return { skipped: 'already awarded', week: monday }; const rules = prizeRules(); - // weekly prizes are for Game Pass holders (Marty 2026-11-02: the Pass is the purchase that funds the game); with GAMEPASS off, everyone qualifies as before - let passOk = () => true; try { const gp = require('./polgrant'); if (gp.on && gp.on()) passOk = r => { try { return !!gp.passOf(r.memberId, r.email).active; } catch (e) { return false; } }; } catch (e) {} - const winners = weekRows(monday).filter(r => r.finds >= rules.minFinds && passOk(r)).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r)); + // weekly prizes are for EVERY hunter with the minimum finds, Game Pass or not (Marty 2026-11-23: the leaderboard promised the top + // three and only one Pass holder was winning; this reverses the 2026-11-02 Pass-only rule) + const winners = weekRows(monday).filter(r => r.finds >= rules.minFinds).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r)); const day = ctDay(), at = Date.now(); const recs = winners.map(w => ({ id: 'prize' + monday.replace(/-/g, '') + '-' + w.rank, memberId: w.memberId, email: w.email, wallet: w.wallet, username: w.username, missionId: 'prize:' + monday, site: 'Weekly prize #' + w.rank, pol: w.prizePol, day, at, status: 'due', tx: null, paidAt: null, error: null, prize: { week: monday, rank: w.rank } })); if (recs.length) store.update('payouts', [], all => { all.push(...recs); return all; }); @@ -112,6 +112,24 @@ function awardWeek(monday) { store.update('prizes', [], all => { all.push(entry); return all; }); return entry; } +// fill a week that was ALREADY awarded under an older rule (Marty 2026-11-23, the week of 11-16 paid only the one Pass holder): today's +// rule picks the top hunters again, and anyone in that list who was not paid for the week gets the prize of their place. Nobody already +// paid is touched, nothing is paid twice (a payout row for that member and week blocks it), and a second call adds nothing. +function awardFill(monday) { + if (!/^\d{4}-\d{2}-\d{2}$/.test(monday || '') || weekOf(monday) !== monday) return { error: 'not a Monday key' }; + const done = store.read('prizes', []), cur = done.find(x => x.week === monday); + if (!cur) return { error: 'that week has not been awarded yet' }; + const rules = prizeRules(), paidTo = new Set(store.read('payouts', []).filter(p => p.prize && p.prize.week === monday).map(p => p.memberId)); + const top = weekRows(monday).filter(r => r.finds >= rules.minFinds).slice(0, rules.pol.length).map((r, i) => Object.assign({ rank: i + 1, prizePol: rules.pol[i] }, r)); + const add = top.filter(w => !paidTo.has(w.memberId)); + if (!add.length) return { week: monday, winners: [], filled: 0 }; + const day = ctDay(), at = Date.now(); + const recs = add.map(w => ({ id: 'prize' + monday.replace(/-/g, '') + '-f' + w.rank, memberId: w.memberId, email: w.email, wallet: w.wallet, username: w.username, missionId: 'prize:' + monday, site: 'Weekly prize #' + w.rank, pol: w.prizePol, day, at, status: 'due', tx: null, paidAt: null, error: null, prize: { week: monday, rank: w.rank, fill: true } })); + store.update('payouts', [], all => { all.push(...recs); return all; }); + const added = add.map(w => ({ rank: w.rank, memberId: w.memberId, who: w.who, finds: w.finds, pol: w.pol, prizePol: w.prizePol })); + store.update('prizes', [], all => { const e = all.find(x => x.week === monday); if (e) { e.winners = e.winners.concat(added).sort((a, b) => a.rank - b.rank); e.filledAt = at; } return all; }); + return { week: monday, winners: added, filled: added.length }; +} // on every tick: the most recent completed week gets awarded on the first tick after it ends function awardDue(notify) { const last = dayMinus(weekOf(ctDay()), 7); @@ -139,4 +157,4 @@ function memberByName(who) { } function shareLink(site, me) { const ref = me.username || me.memberId; return site + '/?r=' + encodeURIComponent(String(ref)); } -module.exports = { BADGES, badgesFor, leaderboard, rankOf, shareLink, weekOf, weekRows, awardWeek, awardDue, prizes, prizeRules, nameOf, memberByName }; +module.exports = { BADGES, badgesFor, leaderboard, rankOf, shareLink, weekOf, weekRows, awardWeek, awardFill, awardDue, prizes, prizeRules, nameOf, memberByName }; diff --git a/public/guides/faq.html b/public/guides/faq.html index 015737c..e80a0e1 100644 --- a/public/guides/faq.html +++ b/public/guides/faq.html @@ -31,7 +31,7 @@
No. You hunt with a free InstantAdPay account. The Game Pass is optional and sold on InstantAdPay.
No. You sign in with your InstantAdPay account. No separate account or password is created here.
SafePal or any other crypto wallet that works on Polygon. Link it in your InstantAdPay dashboard under Wallet; drips go to that address.
A free account finds 1 code a day. Game Pass holders find 5. Advertiser missions and Friday Bonus Hunts can add more.
A free find pays a random 0.02 to 0.10 POL the first time you find each site; after you have found them all, a repeat find is a tour stop worth 10 InstantAdPay ad credits instead, and a new site pays POL again on your first find. With the Game Pass a find pays a random 0.05 to 1 POL. Both lean toward the low end. Advertiser missions pay the amount the advertiser set.
Your board offers only the sites you have not found yet this round, the ones new to you first. Find every site and a new round starts, and each finished round counts toward the Full Network Tour badge.
At midnight Central time. The missions, your codes and the daily pool all reset then.
The daily pool is spent. Claims reopen at midnight Central, and a find that went over the pool can be paid on a later day.
The reward wallet sends due drips every couple of minutes. Each one shows up with a Polygonscan link you can open.
No. Every code is made for one hunter and one visit. Someone else’s code will not work for you.
No. One person, one account. Two accounts that share a wallet get one drip per mission per day between them.
Each day from Saturday through Thursday that you open an inbox ad and watch a video on InstantAdPay banks one extra hunt, usable on the Friday that follows.
A Game Pass perk. Finish the day’s hunts and a box opens an Ad Detective case: visit a network site and answer one question about it. The reward is fixed and shown before you start.
The leaderboard ranks hunters by finds from Monday to Sunday, Central time. Ties go to the most POL, then to whoever got there first. The weekly prizes go to Game Pass holders and are paid on chain.
New members you bring can earn you referral rewards, paid from their own pool. Only people who were never members before count.
No. PolHunter rewards completed missions. Rewards are not income and are not guaranteed, and the price of POL moves.
Use network support.
+No. You hunt with a free InstantAdPay account. The Game Pass is optional and sold on InstantAdPay.
No. You sign in with your InstantAdPay account. No separate account or password is created here.
SafePal or any other crypto wallet that works on Polygon. Link it in your InstantAdPay dashboard under Wallet; drips go to that address.
A free account finds 1 code a day. Game Pass holders find 5. Advertiser missions and Friday Bonus Hunts can add more.
A free find pays a random 0.02 to 0.10 POL the first time you find each site; after you have found them all, a repeat find is a tour stop worth 10 InstantAdPay ad credits instead, and a new site pays POL again on your first find. With the Game Pass a find pays a random 0.05 to 1 POL. Both lean toward the low end. Advertiser missions pay the amount the advertiser set.
Your board offers only the sites you have not found yet this round, the ones new to you first. Find every site and a new round starts, and each finished round counts toward the Full Network Tour badge.
At midnight Central time. The missions, your codes and the daily pool all reset then.
The daily pool is spent. Claims reopen at midnight Central, and a find that went over the pool can be paid on a later day.
The reward wallet sends due drips every couple of minutes. Each one shows up with a Polygonscan link you can open.
No. Every code is made for one hunter and one visit. Someone else’s code will not work for you.
No. One person, one account. Two accounts that share a wallet get one drip per mission per day between them.
Each day from Saturday through Thursday that you open an inbox ad and watch a video on InstantAdPay banks one extra hunt, usable on the Friday that follows.
A Game Pass perk. Finish the day’s hunts and a box opens an Ad Detective case: visit a network site and answer one question about it. The reward is fixed and shown before you start.
The leaderboard ranks hunters by finds from Monday to Sunday, Central time. Ties go to the most POL, then to whoever got there first. The weekly prizes go to the top three hunters with 10 or more finds that week, with or without a Game Pass, and are paid on chain.
New members you bring can earn you referral rewards, paid from their own pool. Only people who were never members before count.
No. PolHunter rewards completed missions. Rewards are not income and are not guaranteed, and the price of POL moves.
Use network support.
Without a linked wallet you can see your board, but you cannot start a mission. That is the most common thing that stops a new hunter, so do it first.
A free account gets one code a day, and missions reset at midnight Central. Each site pays POL the first time you find it; once you have toured them all, a repeat find is a tour stop worth 10 InstantAdPay ad credits, and new sites pay POL again. One find a day, every day, is the habit that counts. Your finds also earn badges and put you on the leaderboard.
From Saturday through Thursday, each day you open an inbox ad and watch a video on InstantAdPay banks one extra hunt for Friday. You can also earn ad credits while you are there. Ad credits buy advertising, not income.
When an advertiser mission is live and you have not done it today, it adds one extra hunt to your day and pays the amount the advertiser set.
Your board has your own share link. People who join InstantAdPay from it are your referrals there, and new members you bring can also earn you referral rewards here, paid from their own pool. Only people who were never members before count.
The Game Pass on InstantAdPay is optional. With it you hunt 5 codes a day on the full draw, and you get the Mystery Hunt Box, the Ad Detective cases and the weekly prizes. Hunting free is fine too.
+Without a linked wallet you can see your board, but you cannot start a mission. That is the most common thing that stops a new hunter, so do it first.
A free account gets one code a day, and missions reset at midnight Central. Each site pays POL the first time you find it; once you have toured them all, a repeat find is a tour stop worth 10 InstantAdPay ad credits, and new sites pay POL again. One find a day, every day, is the habit that counts. Your finds also earn badges and put you on the leaderboard.
From Saturday through Thursday, each day you open an inbox ad and watch a video on InstantAdPay banks one extra hunt for Friday. You can also earn ad credits while you are there. Ad credits buy advertising, not income.
When an advertiser mission is live and you have not done it today, it adds one extra hunt to your day and pays the amount the advertiser set.
Your board has your own share link. People who join InstantAdPay from it are your referrals there, and new members you bring can also earn you referral rewards here, paid from their own pool. Only people who were never members before count.
The Game Pass on InstantAdPay is optional. With it you hunt 5 codes a day on the full draw, and you get the Mystery Hunt Box and the Ad Detective cases. The weekly prizes are open to every hunter, Pass or not. Hunting free is fine too.
PolHunter is a scavenger hunt across the network. A mission sends you to one of our sites. You spend the time on the page, your personal code shows up somewhere on it, and you type that code into your board. A correct code pays a random drip of POL on Polygon to the wallet on your InstantAdPay account.
Each code is made for you and for that one visit, and it only shows on the mission site after the wait. A code copied from someone else will not work for you, and the hiding place moves.
| Account | Codes a day | Each find pays |
|---|---|---|
| Free InstantAdPay account | 1 | 0.02 to 0.10 POL on a site new to you; a repeat is a tour stop worth 10 InstantAdPay ad credits |
| Game Pass holder | 5 | 0.05 to 1 POL |
The drip is random inside that range and weighted toward the low end, so small drips are common and big ones are rare. Advertiser missions, when there are any, pay the amount the advertiser set and add one extra hunt each.
Each mission can be found once per day, and the day runs on Central time. At midnight Central the codes, the missions and the daily pool all reset. Two accounts that share a wallet get one drip per mission per day between them.
Your board walks you around the whole network. Each round, it only offers the sites you have not found yet this round, newest to you first; find them all and a new round starts, with the Full Network Tour badge for every round you finish.
On a free account, a find pays POL while you are discovering: the first time you find each site. Once you have found every site, a repeat find is a tour stop that pays 10 InstantAdPay ad credits instead of POL, and each new site that joins the network pays POL again on your first find. Game Pass holders are paid POL on every find.
Finds are paid from a daily pool. If it is spent before the day ends, your board says so and claims reopen at midnight Central. A find that would go over the pool can be queued and paid on a later day instead.
Friday Bonus Hunts. On InstantAdPay, each day from Saturday through Thursday that you open an inbox ad and watch a video there banks one extra hunt for the Friday that follows.
Mystery Hunt Box and Ad Detective. Game Pass holders who finish the day’s hunts unlock a box with an Ad Detective case: visit a network site, then answer one question about it. The reward is fixed and shown before you start.
Weekly prizes. The leaderboard ranks hunters by finds, Monday to Sunday Central time. The weekly prizes go to Game Pass holders and are paid on chain from the same reward wallet.
Nothing here is promised. Rewards are not income, and the range, the number of hunts and the pools can change. See the Rewards disclaimer.
+PolHunter is a scavenger hunt across the network. A mission sends you to one of our sites. You spend the time on the page, your personal code shows up somewhere on it, and you type that code into your board. A correct code pays a random drip of POL on Polygon to the wallet on your InstantAdPay account.
Each code is made for you and for that one visit, and it only shows on the mission site after the wait. A code copied from someone else will not work for you, and the hiding place moves.
| Account | Codes a day | Each find pays |
|---|---|---|
| Free InstantAdPay account | 1 | 0.02 to 0.10 POL on a site new to you; a repeat is a tour stop worth 10 InstantAdPay ad credits |
| Game Pass holder | 5 | 0.05 to 1 POL |
The drip is random inside that range and weighted toward the low end, so small drips are common and big ones are rare. Advertiser missions, when there are any, pay the amount the advertiser set and add one extra hunt each.
Each mission can be found once per day, and the day runs on Central time. At midnight Central the codes, the missions and the daily pool all reset. Two accounts that share a wallet get one drip per mission per day between them.
Your board walks you around the whole network. Each round, it only offers the sites you have not found yet this round, newest to you first; find them all and a new round starts, with the Full Network Tour badge for every round you finish.
On a free account, a find pays POL while you are discovering: the first time you find each site. Once you have found every site, a repeat find is a tour stop that pays 10 InstantAdPay ad credits instead of POL, and each new site that joins the network pays POL again on your first find. Game Pass holders are paid POL on every find.
Finds are paid from a daily pool. If it is spent before the day ends, your board says so and claims reopen at midnight Central. A find that would go over the pool can be queued and paid on a later day instead.
Friday Bonus Hunts. On InstantAdPay, each day from Saturday through Thursday that you open an inbox ad and watch a video there banks one extra hunt for the Friday that follows.
Mystery Hunt Box and Ad Detective. Game Pass holders who finish the day’s hunts unlock a box with an Ad Detective case: visit a network site, then answer one question about it. The reward is fixed and shown before you start.
Weekly prizes. The leaderboard ranks hunters by finds, Monday to Sunday Central time. The weekly prizes go to the top three hunters with 10 or more finds that week, with or without a Game Pass, and are paid on chain from the same reward wallet.
Nothing here is promised. Rewards are not income, and the range, the number of hunts and the pools can change. See the Rewards disclaimer.
PolHunter (polhunter.com) is run by TrustClickz. It is a game in the InstantAdPay network. By using PolHunter you agree to these terms.
PolHunter is a scavenger hunt across network websites. A mission sends you to a page where a code is hidden; you find the code and enter it here. A correct find can pay a small drip of POL on Polygon from the PolHunter reward wallet.
You sign in with your InstantAdPay account. No separate account is created here. Drips go to the wallet linked to your InstantAdPay account. You must be old enough to make a binding agreement where you live, and using crypto must be legal there.
Each mission can be found once per Central day. A free InstantAdPay account can claim a limited number of finds a day at a smaller drip; Game Pass holders get more finds a day, the weekly prizes and the Mystery Hunt Box. Drips are random within the range shown on the site. The daily pool is limited: when it is spent, claims close until midnight Central or are paid on a later day. Referral rewards, when offered, are paid to the referrer from their own limited pool and only for new members.
Rewards are not income, wages, an investment or a promise of any payment. We may change the drip range, the number of finds, the pools, the missions or the prizes at any time. Read the Rewards disclaimer.
One person, one account. Two accounts sharing a wallet get one drip per mission per day between them. Bots, scripts, shared or traded codes, multiple accounts and faked visits are not allowed. We may refuse, hold or reverse a reward we judge not to be fair play, and close the account behind it.
The price of POL moves. The dollar value of a drip can be higher or lower later. Blockchain transactions are final. You are responsible for your wallet and its recovery phrase; never share it with anyone. We will never ask for it.
Missions send you to network and partner websites run under their own terms. We are not responsible for third-party websites.
The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. Changes to these terms apply from the date they are posted here.
As far as the law allows, we are not responsible for losses caused by the blockchain, your wallet, the price of POL, third-party websites, or events outside our control. These terms are governed by the laws of the State of Alabama, USA.
Questions, problems or a request about your data: network support (TrustClickz).
+PolHunter (polhunter.com) is run by TrustClickz. It is a game in the InstantAdPay network. By using PolHunter you agree to these terms.
PolHunter is a scavenger hunt across network websites. A mission sends you to a page where a code is hidden; you find the code and enter it here. A correct find can pay a small drip of POL on Polygon from the PolHunter reward wallet.
You sign in with your InstantAdPay account. No separate account is created here. Drips go to the wallet linked to your InstantAdPay account. You must be old enough to make a binding agreement where you live, and using crypto must be legal there.
Each mission can be found once per Central day. A free InstantAdPay account can claim a limited number of finds a day at a smaller drip; Game Pass holders get more finds a day and the Mystery Hunt Box. The weekly prizes are open to every hunter who reaches the minimum finds. Drips are random within the range shown on the site. The daily pool is limited: when it is spent, claims close until midnight Central or are paid on a later day. Referral rewards, when offered, are paid to the referrer from their own limited pool and only for new members.
Rewards are not income, wages, an investment or a promise of any payment. We may change the drip range, the number of finds, the pools, the missions or the prizes at any time. Read the Rewards disclaimer.
One person, one account. Two accounts sharing a wallet get one drip per mission per day between them. Bots, scripts, shared or traded codes, multiple accounts and faked visits are not allowed. We may refuse, hold or reverse a reward we judge not to be fair play, and close the account behind it.
The price of POL moves. The dollar value of a drip can be higher or lower later. Blockchain transactions are final. You are responsible for your wallet and its recovery phrase; never share it with anyone. We will never ask for it.
Missions send you to network and partner websites run under their own terms. We are not responsible for third-party websites.
The site is provided as it is. We work to keep it running but cannot promise it will always be available or free of errors. Changes to these terms apply from the date they are posted here.
As far as the law allows, we are not responsible for losses caused by the blockchain, your wallet, the price of POL, third-party websites, or events outside our control. These terms are governed by the laws of the State of Alabama, USA.
Questions, problems or a request about your data: network support (TrustClickz).
diff --git a/server.js b/server.js index 27cd737..fcb48f2 100644 --- a/server.js +++ b/server.js @@ -53,7 +53,7 @@ const IAP_URL = String(process.env.IAP_URL || 'https://instantadpay.com').replac gp.use({ game: 'polhunter', secret: String(process.env.HUNT_SSO_SECRET || '').trim(), iap: IAP_URL, store, notify: (kind, p) => notify(kind, p) }); const passActive = me => !!(gp.on() && me && gp.passOf(me.memberId, me.email).active); const passExtra = me => passActive(me) ? 2 : 0; // the perk: 5 missions a day instead of 3 -// the full tier (Marty 2026-11-02): Game Pass holders get the full allotment, the full draw, the weekly prizes and the Mystery Box; +// the full tier (Marty 2026-11-02): Game Pass holders get the full allotment, the full draw and the Mystery Box (weekly prizes are open to everyone since 2026-11-23); // a free account gets the free tier (lib/rewards.js freeMissionsPerDay / freeMinPol / freeMaxPol). With GAMEPASS off there is no // pass to buy, so everyone stays on the full tier as before. const fullTier = me => !gp.on() || passActive(me); @@ -396,6 +396,8 @@ const server = http.createServer(async (req, res) => { if (p === '/api/admin/settings' && req.method === 'POST') { const b = await readBody(req); const patch = {}; for (const k of ['minPol', 'maxPol', 'dailyCapPol', 'lowBalancePol', 'weeklyMinFinds', 'drawSkew', 'missionsPerDay', 'freeMissionsPerDay', 'freeMinPol', 'freeMaxPol', 'detectiveOn', 'detectivePol', 'refEnabled', 'refBountyPol', 'refMatchPct', 'refMatchDays', 'refNewDays', 'refCapPol', 'refMatchMinPol', 'rotationOn', 'tourStopCredits', 'tourStopCreditsDailyMax']) if (b[k] != null && Number(b[k]) >= 0) patch[k] = Number(b[k]); for (const k of ['weeklyPrizes', 'leaderboardExclude']) if (Array.isArray(b[k])) patch[k] = b[k].map(Number).filter(n => n >= 0); return json(res, 200, { ok: true, settings: rewards.setSettings(patch) }); } // award a week by hand (its Monday key); already-awarded weeks are skipped if (p === '/api/admin/prizes/award' && req.method === 'POST') { const b = await readBody(req); const r = social.awardWeek(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); } + // fill an already-awarded week under today's rule (2026-11-23): pays the places that went unpaid, never anyone twice + if (p === '/api/admin/prizes/fill' && req.method === 'POST') { const b = await readBody(req); const r = social.awardFill(String(b.week || '')); if (r && r.winners && r.winners.length) notify('prize', r).catch(() => {}); return json(res, r && r.error ? 400 : 200, r); } // Ad Detective question bank: stats per question, add or edit one, retire or restore one if (p === '/api/admin/rotation') return json(res, 200, rotation.adminView()); // the Network Tour: rounds per hunter, tour-stop credits sent / owed if (p === '/api/admin/detective') return json(res, 200, detective.stats());