Game Pass package rail, part two: Admin > Game Pass gets a Pass sales table (every sale labelled package / credit-paid (old rule) / package (old rule), pass value, package value, package tx link) and stats passes.pay + sales; the chatbot canned answer, tier fact and system prompt say every pass is paid by a new package bought after tapping Get (sponsor and team paid, credits kept for ads, held credits never buy a pass); docs/GAME-PASS.md "Payment: the package rail" section; release-note update draft (not sent); admin.js tag bumped. Fulfilment stamps the pass at the event time again (as before). Tests: sov-passes store + local rebuilt on order + fresh package (seeded credits never spent), gamepass ALL PASS, member walk 0 bugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-22 12:49:39 -05:00
parent 6a3313a861
commit 31b167e046
8 changed files with 195 additions and 81 deletions
+25 -3
View File
@@ -23,9 +23,9 @@ Every member earns real POL in our games, and that does not change. What is new:
instead of 2), a place in the weekly **Pass Tournament**, extra plays or a perk in each game (more PolHunter missions, a free
continue in Gem Kingdom, a free hint in SpellWheel and ClutterHunt, an extra patrol in Road Agent, a starting shield in Drip
Runner, an extra paddle in PolyBreak, an extra mission in PolyWarriors, an extra door in Spooky Doors), and the Pass badge.
- **How to get it.** Members > Games > Game Pass. It costs 500 purchased credits, the credits from a package you bought. If you
have none, buy a $5 package and the pass starts the moment it settles; you keep every credit of that package for your ads. Buying
while a pass is active adds 7 days.
- **How to get it.** Members > Games > Game Pass. Tap Get the Pass, then buy a new package of $5 or more. The pass starts the
moment that purchase settles. Your sponsor and team are paid from it as usual, and you keep every credit of the package for your
ads. Credits you already hold never buy a pass. Buying again while a pass is active adds 7 days.
- **Account-wide daily caps, from [DATE].** Until now each game had its own daily limit. From [DATE] the limit is one number for
your whole account across all the games, reset at midnight Central: free play 0.30 POL a day on repeatable rewards (finds, daily
puzzles, patrols, gems, drips) and 2 POL a day for everything; with the Pass 1.50 and 5. A one-time reward (a boss, a chapter, a
@@ -48,3 +48,25 @@ The Pass does not change what any reward pays. Free play pays; the Pass plays mo
Never "earn more", "pays for itself", "income". Always "free play pays; the Pass plays more". Reward amounts never change with the
Pass. Caps are per account, per Central day. Deferred progress rewards are "paid over the next days", never "lost".
## Update draft, 2026-10-22: how the Game Pass is paid (not sent)
Status: DRAFT for Marty's review. Nothing has been posted, emailed or published.
**Short version (Telegram / feed)**
A change to how the Game Pass is paid: from today every pass is paid by a new package purchase. Tap Get the Pass in Members >
Games, buy a package of $5 or more, and the pass starts the moment it settles. Your sponsor and team are paid from that package,
and you keep all of its credits for your ads. Credits you already hold no longer buy a pass. Passes you already have keep running.
**Release note (Admin > Releases)**
**The Game Pass is now paid with a new package**
- Tap Get the Pass (or Get on any pass) in Members > Games. Then buy a package of at least the pass price: $5 for the weekly Game
Pass.
- The pass starts the moment that purchase settles on chain. A package bought before you tapped Get does not count.
- Your sponsor and team are paid from that package exactly like any other package, and every credit of the package stays yours for
your ads.
- Credits you already hold, earned or purchased, no longer buy a pass.
- Any pass you already have keeps running to its end date.
+34 -3
View File
@@ -1,5 +1,8 @@
# Game Pass: draft spec (2026-10-16)
> **PAYMENT RULE CHANGED 2026-10-22 (Marty): every pass is paid by a FRESH on-chain package purchase; no pass is ever bought with
> credits again.** See "Payment: the package rail" at the end. Older sections below that mention credits describe the rule as it was.
Marty's direction (10-16): a $5 weekly Game Pass that covers all nine games and raises the daily POL cap; a tighter
free cap so nobody farms the games all day for free. Pass = "more game", never pitched as payback. Free play keeps
paying real POL (the "paid before they ever pay" funnel in the presentation, deck and guide).
@@ -31,7 +34,7 @@ a single day. No other game pays more than 2 POL for any single reward.
## 2. The pass
- **$5, 7 days, all nine games.** One pass per account; buying while active extends by 7 days.
- Paid with **purchased-grade credits only** (500 credits = the $5 package), through the existing game-purchase path
- (Superseded 2026-10-22, see "Payment: the package rail".) Paid with **purchased-grade credits only** (500 credits = the $5 package), through the existing game-purchase path
(`ads.gamePurchase` with `purchasedOnly`, the same rule as PolyWarriors mint passes). A $5 package bought while a pass
order waits fulfils it (the `pwpasses` pattern). Earned credits never buy a pass, or no money enters and the pass is
just a free cap increase.
@@ -95,7 +98,7 @@ that anyway." The paced total cap spreads a big boss payout over a few days; the
> `POST /api/partner/tournament/paid { game, week, place, tx }` so the row leaves the list. PolHunter's faucet pays them
> (`polhunter/lib/tournament.js`, see "Games: as built"); Admin > Game Pass shows the unpaid rows meanwhile.
> 9. **Not deviations, just dev conveniences (non-production only):** `devDay: 'YYYY-MM-DD'` on `polgrant`/`player`/`buy` fakes the
> Central day; `POST /api/dev/gamepass-purchase` fakes a package event; `devPaid: true` on `buy` skips the credit charge.
> Central day; `POST /api/dev/gamepass-purchase` fakes a package event; `devPaid: true` on `buy` skipped the credit charge (retired 2026-10-22: there is no charge any more; the dev purchase event takes `minedAt`, `now` and `tx`).
IAP is the single source of truth for the pass and for the account-wide caps. Every game already signs partner calls
with its shared secret (the `/api/partner/player` pattern); the new calls use the same auth.
@@ -114,7 +117,7 @@ with its shared secret (the `/api/partner/player` pattern); the new calls use th
`capFreeDaily` 0.30, `capFreeTotal` 2.0, `capPassDaily` 1.50, `capPassTotal` 5.0, `capsStartDate` (the free caps apply
only from this Central date; before it, the games' own caps stand, so the change can be announced a week ahead),
`passTournamentPct` 5.
- Pass purchase: `POST /api/my/gamepass/buy` spends 500 purchased-grade credits (`ads.gamePurchase` with
- Pass purchase (superseded 2026-10-22: Buy only opens an order, a fresh package fulfils it): `POST /api/my/gamepass/buy` spends 500 purchased-grade credits (`ads.gamePurchase` with
`purchasedOnly`); a $5 package bought while a pass order waits fulfils it (the `pwpasses` pattern). Buying while active
extends `until` by 7 days. The Games tab shows the card, the state, and the expiry.
- Games get the pass flag at the sign-in hand-off and on every `polgrant` response; apply perks locally.
@@ -333,3 +336,31 @@ drives the REAL `spooky-doors/server/polgrant.js` and `polhunter/lib/tournament.
(`carried` > 0, idempotent repeat), void, bad secret and IAP-down -> `{ allowed: 0, retry: true }`, the retry queue, and the
tournament payer in dry run and live (mocked faucet.send) until IAP's pending list is empty. 2026-10-16: 44/44 after the `rows`
fix on the pending endpoint (the games read `rows`; IAP answered only `pending`).
## Payment: the package rail (2026-10-22, Marty)
**Why.** A pass paid from a credit balance brings in no new money and pays nobody upline: credits come from packages whose POL was
already split on chain ($2.50 sponsor, $1 level 2, $0.50 level 3, $1 company on a $5 package). Today's pass buyer paid from an old
balance. From now on every pass is a fresh package purchase, so the sponsor and team are paid exactly like any package.
**Rule.**
- `POST /api/my/gamepass/buy { tier }` never charges anything. It opens a waiting order for that tier (or returns the one already
open) and answers `{ needPay: true, order, orderTs, package, payUrl, message }`. The card sends the member to Buy credits.
- The order is fulfilled only by an on-chain `Purchase` event (`gamepass.onEvent`, inside the `marks.claim` block, so one app copy
acts) that meets ALL of:
- the buyer id is one of this account's own positions: the main member id (`accounts.byMemberId`) or a linked position
(`accounts.positionByMember`);
- `priceCents` is at least the tier price (setting `gamePass*PriceCredits`, now read as cents; the copy names the package that
covers it: $5, $20, $50, $100, $250);
- the purchase was mined AFTER the order was opened: block time from `eth_getBlockByNumber` (server.js `blockTime` dep), with a
30 s clock grace; if the block cannot be read after 3 tries the indexed-at time is used (never earlier than the block);
- the tx has never paid a pass or an order before (checked across every order and every bought row, every account).
- One pass per purchase: the highest-priced waiting order the package covers. The member keeps every credit of the package.
- Bought row: `{ via: 'package', tier, tx, cents, order, buyerId, usd: <pass price>, packageUsd }`. `buyerId` marks the new rail.
- Existing passes are untouched (never revoked). On 2026-10-22 production held two sales: one `via: 'credits'` (500 credits,
campaign 513) and one `via: 'package'` fulfilled under the old rule (tx 0xdbfb77c7...). No order was left waiting.
- Admin > Game Pass > **Pass sales**: every sale with how it was paid ("package", "credit-paid (old rule)", "package (old rule)"),
pass value, package value and the package tx; the header splits the counts. Stats field `passes.pay` and `sales`.
- Tests: `qa/gamepass.mjs` (order, package mined before the order refused, too small refused, another member refused, fresh package
fulfils, replayed tx refused, extend while active); `qa/sov-passes-store.cjs` and `qa/sov-passes-local.mjs` updated the same way.
- Not changed: the caps, the tiers, the tournament (pool = pass price of each sale), the hand-off claims.