22 Commits

Author SHA1 Message Date
martbost 8a006a90c1 Paid missions: $30 blocks, a $10 listing, priced off the live POL rate
Marty's pricing, settled. A block is $30 and buys completions rather than a
fixed count: the advertiser picks what hunters earn and the count falls out, so
a higher payout trades visits for speed at the same price.

  0.30/completion -> 666 visits      0.75 -> 272      1.00 -> 204

The listing fee is $10, charged ONCE per mission and only at approval, because
that is when the review it pays for has actually happened. Never charged again
on that mission, and waived entirely on a first order of 4 blocks or more.

  1 block  $40    2 blocks  $70    4 blocks  $120 (listing waived)
  repeat   $30

No volume discount, deliberately. At a 20% margin the reserve is a hard cost
owed to hunters, so a discount comes entirely out of the house share with five
times leverage: 10% off the price is half the margin gone. The levers that do
not cost anything are the listing waiver and priority placement.

Dollars convert at the InstantAdPay contract's own quote (priceCents/quoteWei),
so a mission is priced at exactly the rate members already pay for packages. No
third-party feed. Reads $0.1055/POL right now. It throws rather than guessing:
a purchase priced off a rate we could not read is a purchase that might sell
delivery below cost.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-24 10:49:08 -05:00
martbost c81c720602 Paid missions: margin on IAP's basis, and the reserve covers gas
Margin is now 20% of what the advertiser pays, the same basis as InstantAdPay's
platform share, rather than a mark-up on the reserve. Members already understand
that number, so it needs no second explanation.

The reserve was covering the drips and nothing else. Every drip is its own
transaction and the faucet pays the gas: measured at 0.0060 POL across recent
payouts, 0.60 per hundred completions. Small, but it was coming quietly out of
house money and it is exactly the shape of thing that becomes a shortfall on a
busy chain. Gas is now bought by the advertiser at a 0.01 allowance, and drips
plus gas carry a 10% buffer on top (Marty: happy to hold more back than the
arithmetic demands). The house float doubles to 50.

outstanding() reserves on the same basis it sold on, so the solvency check
cannot drift away from what was actually promised.

  0.30/completion -> 30 drips + 1 gas + 10% = 34.1 reserved, 8.525 margin,
  advertiser pays 42.625 POL, about $4.34 for 100 verified 45-second visits.

20 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-24 09:57:12 -05:00
martbost 0b4f8c627f Advertiser-funded missions: the accounting that keeps their money separate
First increment of paid missions. No advertiser can buy one yet; this is the
layer that has to be right before anyone can, because the faucet is a single
wallet holding house float and every advertiser's unspent reserve at once.

THE SOLVENCY RULE, in paid.canSell: faucet balance must cover the house float
plus every outstanding reserve before a sale is accepted. Break it and you have
sold delivery you cannot pay for, and a hunter finds a code only to watch the
drip fail. Checked before the sale, never after.

Three consequences of Marty's decision that paid missions sit ON TOP of the
daily cap rather than inside it:
  - a paid completion is excluded from paidToday, so it cannot eat house budget
  - each live paid mission the hunter has not done raises their allowance by one
  - a paid mission pays exactly what the advertiser set, with no random draw, so
    the reserve taken at purchase is exact and can never come up short

Advertisers set the hunter payout themselves, floored at 0.30, and may pay more
to be completed sooner. Company margin rides on top as a percentage.

Existing missions are untouched: nothing carries the paid flag, so house
behaviour is byte for byte what it was. 18 new tests, 79 across the suite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-24 09:40:17 -05:00
martbost 2503b1e1a2 The board says the one condition out loud
The card read "when someone new opens PolHunter" and listed everyone a hunter
had brought as hunting or earning, including members who joined InstantAdPay
before the mission existed and can never pay a bounty. So the board promised an
earning the payout code would refuse.

It now says what actually qualifies: someone who has never had an InstantAdPay
account. People who were already members are listed as exactly that, the match
window is not claimed for them, and the counts show how many of the brought are
genuinely new.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 11:41:54 -05:00
martbost d04474fd7b Referral gate fails closed: a broken setting pays nobody
The rule is that a bounty is only ever earned by somebody who did not exist in
InstantAdPay before the mission did. The check was written so that an absent or
unparseable refNewAfter meant "no floor, pay everyone", which is the same shape
as the rolling window that paid 8.67 POL for members who already existed.

Now a blank, mistyped, zero or missing floor pays nobody at all, and so does a
member with no InstantAdPay join date on file. The gate can only ever be opened
on purpose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 11:36:59 -05:00
martbost cca90bdd00 Referrals only pay for people who did not exist before
The new-member gate was refNewDays: 30, a rolling window, on a site whose
oldest account is 19 days old. It therefore excluded nobody. Every referral
payment made today, 8.67 POL across nine people, went to a sponsor for an
existing member hunting. Not one was an acquisition, which is the entire
purpose of the mission.

The gate is now an absolute date, refNewAfter, set to the morning the mission
went live. Anyone whose account predates that moment was already a member by
definition and can never earn their sponsor a bounty, a match or the launch
bonus, however much they hunt. The 30-day window stays as a secondary rule so a
dormant signup cannot trigger a bounty a year later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 11:30:04 -05:00
martbost 4cfe851e81 Launch bonus: pay it automatically to the first referral home
Marty offered 5 POL to the first hunter who gets a referral all the way
through. It now pays itself: the bonus is written alongside the very first
bounty anyone earns, from the same faucet, and can never be written twice.

It sits outside the daily referral ceiling on purpose, because it is one
payment rather than a rate, and it announces itself to Telegram so the room
knows the race is over. While it is unclaimed the board card says so, and the
moment it is won the card stops advertising it.

Set refFirstBonusPol to 0 to retire it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 10:07:23 -05:00
martbost c316dab8e6 Recruiter badge: the card for bringing someone who actually hunts
Matches the existing set at 1080x1080, same violet and gold, same laurel
wreath and floating Polygon coins, with a blank ribbon for the hunter's name.
Inside the wreath, four anonymous figures wired together as a team tree, one
at the top lighting up the three below it.

Awarded on a bounty rather than a match, so it means a person they brought
turned up and found their first code, not merely that an existing hunter
kept hunting. It shows locked on the board until then, which is the point.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 06:10:00 -05:00
martbost 48611374d6 Referral card: count someone as brought on the day they joined InstantAdPay, not the day this directory first saw them
The backfill stamped firstSeen at seeding time, so every hunter already on the
board read as brought in today.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 04:43:34 -05:00
martbost 1c9e99f91e Referral rewards: pay a hunter for bringing someone who actually hunts
PolHunter retains well and recruits badly. On 2026-09-22 it had its best day,
105 finds from 37 hunters, and had sent three people to InstantAdPay in its
whole life, all three on one member's link. Earning and sharing were separate
actions and only one of them paid.

Bringing someone is now the best-paid thing on the board, and the card sits
first in the mission list rather than on a promo page nobody opens. A flat 3
POL the first time someone they brought finds a code, then 20% on top of that
person's finds for their first 30 days, paid from the pool and never taken out
of the newcomer's drip.

Who counts as "brought by me" is the sponsor they actually joined
InstantAdPay under, handed over in the sign-in payload, so the bounty and the
commission always land on the same person. The bounty only pays for a member
who is genuinely new, once per person, and referral drips have their own daily
ceiling so a good referral day can never starve the finds.

Also: findsToday defaulted its day argument to undefined and silently returned
zero for every caller that omitted it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 04:34:22 -05:00
martbost bed75d1b0f No double posts: badge and find posts reserve an in-flight key the sweeps skip (bikereo2's First Find posted twice, 16 s race); faucet keeps a drip due on transient node errors and rotates through HUNT_RPC (comma list)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 10:45:23 -05:00
martbost 0ba2486c95 Every completed mission reaches Telegram: a paid find marks itself posted, a two-minute sweep posts any paid find not yet posted (pre-live gate, Telegram down, restart), HUNT_POST_SINCE keeps rehearsal finds quiet
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 07:20:16 -05:00
martbost 5db6cdff52 Code pill: six fixed cells on their own row, tap to copy, wrapping header; claim error names the length when it is not 6; board hint
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 07:59:52 -05:00
martbost f1e1886f48 Missions reset with the Central day: a find blocks a mission only for that day (member id or wallet); tag reads Done today
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 07:13:46 -05:00
martbost 7b061480cb Launch build: k=3 floor-weighted draw, three missions per hunter per day, HUNT_LIVE_AT lifts the curtain and opens outbound at the launch moment, badge photos to topic + general, toasts on the board
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-20 05:04:24 -05:00
martbost 8eecc7c0cb Badge cards: seven AI artworks for the hunting achievements, the hunter's name stamped on the ribbon server-side (ffmpeg), public share pages /b/<who>/<id> with OG cards, badge strip + share modal + unlock celebration on the board, Telegram photo post gated by OUTBOUND
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 20:31:20 -05:00
martbost 7b2f71f2f7 Weekly prizes: top three of the Monday-to-Sunday Central week with 10+ finds get 3/2/1 POL as due prize drips (never finds, never against the pool), awarded once on the first tick after Sunday; Top Hunter badge; /api/prizes + winners on /leaders; admin award-by-hand
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 19:53:03 -05:00
martbost dd6a3a3bfa Social layer: leaderboard (week/month/all) + six badges, /leaders and /promo pages, share panel and rank on the board, ?r= referral cookie -> member's IAP join link, OG tags, banner set served through the curtain
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 19:40:50 -05:00
martbost 4beda14950 Pool spent: board notice + closed missions, starts/claims refused until midnight Central; no-wallet onboarding panel; landing: Before your first hunt steps + teaser player above the fold
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 19:16:43 -05:00
martbost bac6110fad Faucet: settle sent drips from their receipts on every tick; a wait timeout or restart never strands or re-sends a drip
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 18:33:41 -05:00
martbost fd72ea1b84 Phone-run fixes: hash tokens, embed wakes on tab focus, dry faucet leaves drips due (+admin retry), short drip status, claim box wraps; one drip per wallet per mission
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 17:57:20 -05:00
martbost 523d57624e PolHunter v0.2: the hunt engine
Hand-off sign-in from InstantAdPay (lib/sso.js: HMAC token, five minutes, single use; no sign-up,
no mailer), missions with per-member per-visit proof codes (lib/missions.js: the embed is
answered only from the mission's own origin, only after the dwell; hiding place rotates by day
and member), weighted-low rewards with a daily cap that queues rather than refuses
(lib/rewards.js), the faucet sender on ethers with a low-balance alert (lib/faucet.js), the
one-line embed for the sites (public/embed.js), the hunter board, the public ledger, an
admin page, and the site's own look. Telegram is behind the OUTBOUND gate like everything else.
13-check end-to-end test in test/run.js.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 14:17:44 -05:00