SKIP TO CONTENT
Q Nation Crest Q · Q NATION 3,000,000,000 Q · DATA ROOM
JOIN Q NATION BUY / EARN QBUY Q
PAPERS HUB
CONSTITUTIONAL LEDGER :: 3,000,000,000 Q SPECIFICATION & 125 INVARIANT CHECKS
NEXT
MAIN OWNERSHIP COIN3,000,000,000 Q
PEOPLE / INSIDER CAP85% PEOPLE / 5% + 10%
EARNED WORK POOL1,200,000,000 Q (40%)
PUBLIC ROUNDS R1-R10$8M TO $4.096B (V/10 GATE)
QUARTERLY PROFIT SHARE>= 50% DISTRIBUTED
BLENDED GROSS MARGIN39.9% (5 ENGINES)
$QUIT BURNED / LOCKED62.10M / 105.95M (1-YR)
VERIFIED INVARIANTS125 CHECKED (1,192 LINES)
Q TOKENOMICS · CONSTITUTIONAL MODEL · 125 INVARIANT CHECKS

Q TOKENOMICS3,000,000,000 Q OWNERSHIP LEDGER.

Q Ownership Crest

Q : MAIN OWNERSHIP COIN (3,000,000,000 FIXED)

Primary ownership coin of Q Nation: 85% people (2.55B Q), 5% the Founder cap, 10% team cap, >= 50% quarterly profit payouts, $1.00/Q at a $3B exit, and 10 V/10 revenue-gated public rounds.

$QUIT Market Coin

$QUIT : PUBLIC SOLANA MINING & EXECUTION COIN

Freely traded on Solana: 62.10M burned forever, 105.95M locked 1 year in Jupiter Lock, 1x to 10x Hold-to-Mine daily Q, priority Sovereign waves, and 0.21% Launchpad treasury fee.

Q NATION CONSTITUTIONAL MINT : 3B Q & $QUIT TELEMETRYEXPAND 2K
20 HINGED VAULT LOCKERS17 People Lockers (2.55B Q / 85%) + 1 Founder (5%) + 2 Team (10%)
10 INTERACTIVE CONSOLESVault Lockers, 10-Tower Skyline, Treasury Spend Cap, 7 Pots & Calculator
Q TOKENOMICS PROVENANCE, MODEL VERIFICATION & CONTENTS (CLICK TO EXPAND)EXPAND

The numbers behind Q and Q Nation. v6, 12 November 2026.

The ownership figures in this report (the split, the 85/15 rule, the rounds, the work pool with its pots and example pay per action, the unlocks, the paths and the phases) come from Q Nation's public constitutional model and its output, tokenomics_public.json. So do the payout and sale splits, the revenue gate, the Q reference price and THE Q WINDOW, each pot's daily amount, the people's dividend, the margin on each costed revenue line (39.9% blended), the 36-month cash-cap runway plan, the two-sided 240 Q verified invite protocol, the 1.50% Launchpad swap fee split, and the verifiable on-chain $QUIT supply sinks. Where a figure is worked out from that output, the sum is shown next to it. The model checks itself: if any rule in it breaks, or an input it needs is missing, it stops with an error instead of printing a number. The two tables in section 14.1 are worked out from the model's output by the automated paper build verifier, which stops the build if they differ from it.

Contents

  1. Q and $QUIT
  2. Supply and the split
  3. The 85/15 rule
  4. The people's rounds
  5. The work pool
  6. MINING: holding $QUIT
  7. The games pot
  8. Builders
  9. The Community Treasury and THE BOARD
  10. Founder and team unlocks
  11. Profit payouts, the Q Window and the people's dividend
  12. Spending Q, claims and the Q Card
  13. Paths to a million
  14. The five phases
  15. What the model checks
  16. Five revenue engines, organic flywheel and verifiable $QUIT supply sinks

Appendix A. The model code


VAULT BAY 01 OF 17

1. Q and $QUIT

Dual-coin vault architecture: $QUIT public coin on Solana and 3,000,000,000 Q ownership sharesEXPAND 2K

Q Nation is an AI company set up to belong to its people. Two coins run it.

Q is your share of Q Nation. 3,000,000,000 Q is 100% of Q Nation. You get Q in two ways: buy it in the people's rounds, or earn it by work. There is one kind of Q. Bought Q and earned Q carry the same rights.

$QUIT is the public coin. Anyone can buy or sell it on the chart, at any time, at the market price. Ownership of Q Nation is counted only in Q. MINING: hold $QUIT and earn Q from the work pool's holding share, which grows as real members join. It is a reward for long-term holders (section 6).

DUAL-COIN CONSTITUTIONAL ARCHITECTURE3,000,000,000 Q + SOLANA $QUIT
Dual-Coin Constitutional Bridge: 3,000,000,000 Q Ownership Vault and Solana $QUIT CompanionQ SHARE: 10X PEAK10.0X PEAK (365D)
Q FLAGSHIP OWNERSHIP + $QUIT DYNAMO · 3,000,000,000 fixed Q (85% people floor) paired with up to 10.0x daily $QUIT hold-to-mine weight.INTERACTIVE ROTARY BRIDGE
PRIMARY OWNERSHIP COIN · 3B FIXED

Q

85% people-owned flagship asset carrying >= 50% quarterly dividends, 85/15 sale protection, and Board votes.

SOLANA MARKET COMPANION · LIVE

$QUIT

24/7 liquid Solana token powering up to 10x Q mining weight and live AI priority waves.

01What it is
QYour share of Q Nation. 3,000,000,000 Q is 100% of Q Nation.
$QUITThe public coin on Solana.
02How you get it
QBuy it in the ten rounds. Earn it on THE JOB BOARD, in THE ACADEMY, in games, by inviting real members and bringing creators, as a Builder, and by MINING.
$QUITBuy it on the chart.
03What it gives you
QA share of every profit payout. A share of the money if Q Nation is sold. Spending power in THE SHOP. 1 Q = 1 vote on THE BOARD.
$QUIT$QUIT CLUB perks (MEMBER, MANAGER, DIRECTOR, BOARDROOM VIP). Trade calls from the AI desk from 50,000 $QUIT, hands-free trading from 1,000,000 $QUIT. The EX-EMPLOYEES airdrop. Q from MINING.
04Its price
QSet by the round. Round 1: $0.002667 a Q, 37,500 Q for $100. When no round is open, the Q reference price (section 11.3).
$QUITSet by the market.
05Can it be sold
QNot on an exchange, and it cannot be sent or sold to another person. In a quarter with profit, Q Nation buys Q back through THE Q WINDOW.
$QUITAny time, on the chart.
06Where it lives
QQ Nation's ledger is the record. You can claim it into your own Solana wallet, where it shows but cannot be moved.
$QUITYour wallet.

Three other kinds of value appear in the product and never look like Q: PRACTICE SOL (demo money on the launchpad), SCORE or POINTS (game results and cup standings) and CASH (dollar payouts, held as USDC, a digital dollar).

What Q gives you.

01

The sale

If Q Nation is sold for $3B, every Q held is paid $1.

02

Profit payouts

At least 50% of distributable profit is paid to Q holders (section 11.2). THE BOARD can vote to pay more.

03

The shop

Q pays for AI tools at the open round's price, or at the Q reference price when no round is open.

04

A vote

1 Q = 1 vote on THE BOARD, the Q Nation DAO.

The people own 85% of Q Nation, at every payout and at any sale. Section 3 shows how.

THE PEOPLE'S CHARTER. Q sits inside a named legal company whose rules make each Q one unit of its ownership. Q Nation's ledger is that company's register of owners. An independent trustee looks after the people's side, and audited accounts are published every quarter on OPEN BOOKS.

Where things stand. This report sets out the design. The Q ledger, the rounds and Q payments are not live yet. Section 4.6 says when payments open.


VAULT BAY 02 OF 17

2. Supply and the split

3,000,000,000 Q 20-locker ownership matrix and 85/15 people's dividendEXPAND 2K

3,000,000,000 Q is 100% of Q Nation. The split is fixed.

3,000,000,000 Q CONSTITUTIONAL VAULT LEDGER · 7 POOLSCONSTITUTIONAL INVARIANT · VERIFIED
ShareQWhoHow it is releasedPaid at a $3B sale
25%PEOPLE 85%750,000,000The people's rounds300,000,000 Q Strategic Founding Reserve, plus ten public rounds of 45,000,000 Q doubling each round (section 4)$750,000,000
40%PEOPLE 85%1,200,000,000Work and communityEarned by work, released as real members grow (section 5)$1,200,000,000
10%PEOPLE 85%300,000,000Builders and leadersEarned by bringing real paying customers; 1 Builder Unit = 30 Q (section 8)$300,000,000
10%PEOPLE 85%300,000,000Community TreasurySpent only by a vote on THE BOARD (section 9)$300,000,000
5%150,000,000The Founder, founderUnlocks in four steps as real members grow, or at a sale (section 10)$150,000,000
10%300,000,000TeamGranted to named people under signed agreements; the same four steps as the Founder (section 10)$300,000,000
100%3,000,000,000$3,000,000,000
  • The people: 2,550,000,000 Q, 85%. Rounds, work, Builders and the treasury: 750,000,000 + 1,200,000,000 + 300,000,000 + 300,000,000.
  • Founder and team: 450,000,000 Q, 15%. It unlocks as the community grows, or at a sale of Q Nation, and a sale never pays them more than 15%.
  • Team Q counts only once it is granted. A team member's Q counts at a payout or a sale only once it is granted to that named person under a signed agreement, and vested. The independent trustee approves every grant, and OPEN BOOKS lists each one: role, amount and vesting. No grant goes to the Founder, Q Nation Engineering or a company the Founder owns. Team Q not yet granted goes to the people: to the people's Q at payouts, and to the people's dividend at a sale.
  • The last column is each block x $1, the value of 1 Q if Q Nation is sold for $3B, with all of the team's Q granted and vested. At a sale, the people's Q not yet issued is paid to real members as the people's dividend, so the people's four blocks are paid $2,550,000,000 in total whatever has been issued by then, and more if part of the team's Q is not yet granted (section 3).
  • Q has 6 decimals. Screens round down to whole Q.

VAULT BAY 03 OF 17

3. The 85/15 rule

Constitutional 85/15 Ownership Floor and THE BOARD Governance SafeguardsEXPAND 2K
S01

3.1 The rule

HEAD-TO-HEAD OWNERSHIP COMPARISONSUPERIOR MODEL: Q NATION UBO
UNIVERSAL BASIC OWNERSHIP COMPARISON · LEGACY UBI VS Q NATION 85% PEOPLE FLOORCLICK TO EXPAND
LEGACY TAX-FUNDED STIPEND

Universal Basic Income

Funded by shrinking wage taxes; provides zero equity in the AI replacing human labor.

SUPERIOR OPTION · 85% PEOPLE OWNED

Universal Basic Ownership in Q Nation

Direct constitutional ownership in 3,000,000,000 Q plus >= 50% quarterly profit payouts.

01Funding source
Universal Basic IncomeState tax transfers after wage displacement
Universal Basic Ownership in Q Nation85% people floor (2,550,000,000 Q) in an operating AI company
02How people enter
Universal Basic IncomeWait for public benefit rules
Universal Basic Ownership in Q NationEarn free via verified work (1,200,000,000 Q Work Pool) or buy in ten rounds
03Cash & exit rights
Universal Basic IncomeFlat transfer with zero enterprise claim
Universal Basic Ownership in Q NationAt least 50% of distributable profit, Q Window buybacks and 85%+ sale payout
01

At every payout and at any sale, the people get at least 85%

The Founder gets at most 5%. The team gets at most 10%.

02

At a sale, every Q held is paid the same

the sale price divided by 3,000,000,000. That is $1 a Q at $3B.

03

The value of the people's Q not yet issued is paid to real members as a one-time people's dividend

It is split by the Q each real member earned through checked work, times the days they have held it, counted from their first checked job. Each person receives at most 5 times the median, and only after a one-time identity check. An account with no checked work receives nothing (section 11.5).

"Issued" means bought, earned or granted to a person. "Not yet issued" means: round Q not yet sold, work pool Q not yet earned by a member (including Q released into a pot that nobody has earned yet), Builder Q not yet earned, and treasury Q not yet granted. Team Q not yet granted to a named person and vested on the record date is paid into the people's dividend as well (section 2).

S02

3.2 The formula at a sale

This is the sale() function of the model, line for line. It pays each of the 3,000,000,000 Q once, at the same price:

value per Q        = sale price / 3,000,000,000
the Founder                = 150,000,000 x value per Q
team               = team Q granted and vested x value per Q
people's Q         = people's Q issued x value per Q
people's dividend  = (2,550,000,000 - people's Q issued + 300,000,000 - team Q granted and vested) x value per Q
people's share     = (people's Q + people's dividend) / price

A sale unlocks all of the Founder's Q, so the formula pays the Founder exactly 5% at any sale price. With all 300,000,000 team Q granted and vested it pays the team exactly 10% and the people exactly 85%. With less of it granted, the people receive more. A round 1 buyer is paid $1 a Q at $3B whenever the sale happens. An early sale still moves money: it unlocks all of the Founder's and the team's Q at once, and it pays real members a larger people's dividend. That is why a sale needs two yeses on THE BOARD, and why the Founder's and the team's Q do not vote on it.

The model stops with an error, and prints nothing, if the people's Q issued is below 0 or above 2,550,000,000, if the dividend would be below zero, if the people would receive less than 85%, the Founder more than 5% or the team more than 10%, if the Q paid does not add to 3,000,000,000 or the dollars to the price, or if any input is missing.

S03

3.3 Three sale scenarios

All three are computed with sale() at a $3B sale price, with all of the team's Q granted and vested. The value per Q is $1.

CONSTITUTIONAL LIFECYCLE MATRIX · 6 DIMENSIONSCONSTITUTIONAL INVARIANT · VERIFIED
EarlyMiddleLate
People's Q issuedPEOPLE 85%460,000,000 (18% of the people's 2,550,000,000)1,000,000,000 (39%)2,550,000,000 (100%)
the Founder$150,000,000 (5%)$150,000,000 (5%)$150,000,000 (5%)
Team$300,000,000 (10%)$300,000,000 (10%)$300,000,000 (10%)
Paid on the people's QPEOPLE 85%$460,000,000$1,000,000,000$2,550,000,000
People's dividend to real membersPEOPLE 85%$2,090,000,000$1,550,000,000$0
People's sharePEOPLE 85%85%85%85%
01

Early

The 300,000,000 Q Strategic Founding Reserve issued, all 120,000,000 Q of stage 1 of the work pool earned by members, 30,000,000 Builder Q earned and 10,000,000 treasury Q granted. 300,000,000 + 120,000,000 + 30,000,000 + 10,000,000 = 460,000,000.

02

Middle

1,000,000,000 of the people's Q issued. The dividend is $3,000,000,000 - $150,000,000 - $300,000,000 - $1,000,000,000 = $1,550,000,000.

03

Late

Every people's Q has been issued. Nothing is left for a dividend, and every Q is simply paid $1.

When less team Q has been granted. The early case at $3B, computed with sale() at three levels of team grants:

TEAM Q GRANTED AND VESTED SPECIFICATION · 3 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
Team Q granted and vestedPeoplethe FounderTeamPeople's dividend
0%95%5%0%$2,390,000,000
50%90%5%5%$2,240,000,000
100%85%5%10%$2,090,000,000

What the rule prevents. If Q not yet issued were left out of a sale and the price split over the Q that exists, the early case would split $3B over 460,000,000 + 150,000,000 + 300,000,000 = 910,000,000 Q. the Founder would take 16.5% ($494,505,495), the team 33.0% ($989,010,989) and the people 50.5%. The people's dividend closes that gap.

The invariant. The model asserts that the early case pays the people exactly 85% with a dividend of exactly $2,090,000,000, and that the people's share is at least 85% with 0, 300,000,000, 1,000,000,000 and 2,550,000,000 of the people's Q issued. It requires a sale with -1, 2,550,000,001, 2,900,000,000 or 5,000,000,000 of the people's Q issued to stop the run. It runs every case with team grants at 0%, 50% and 100%, at $60,000,000 and at $3B, with 0, 460,000,000 and 2,550,000,000 of the people's Q issued, and checks the people at least 85% and the Founder at most 5% in each. If any of these fails, the model stops.

Who decides a sale. A sale needs two yeses on THE BOARD. In the Q house, two thirds of the Q voting say yes, with at least 30% of the Q that counts taking part. In the members' house, a majority of the voting identity-checked members with a checked record of 90 days or more say yes, with at least 20% of those members taking part. Q Nation is never sold below the last round's valuation, and an independent firm gives its opinion that the price is fair. The Founder's and the team's Q do not vote on a sale (section 9). Profit payouts under the same rule are in section 11.


VAULT BAY 04 OF 17

4. The people's rounds

25% of Q Nation, 750,000,000 Q, sits in the Rounds Vault: 300,000,000 Q in the Strategic Founding Reserve (subject to lock and vesting), followed by 450,000,000 Q across ten public rounds of 45,000,000 Q each. The price per Q is the round's valuation divided by 3,000,000,000. Each round costs twice the last, and Q Nation never sells Q cheaper than an earlier round.

S01

4.1 The ten rounds

Ten public rounds valuation skyline from R1 $8M to R10 $4.096B with audited V/10 revenue gatesEXPAND 2K
CONSTITUTIONAL ROUNDS & V/10 GATES · 10 TRANCHESCONSTITUTIONAL INVARIANT · VERIFIED
SWIPE HORIZONTALLY TO INSPECT ALL 8 COLUMNS
RoundQ Nation valued atPrice per QQ per $100Multiple if Q Nation is sold for $3BRound raisesRaised so farRevenue gate (yearly run rate)
1$8,000,000$0.00266737,500375x$120,000$120,000None
2$16,000,000$0.00533318,750187.5x$240,000$360,000None
3$32,000,000$0.0106679,37593.75x$480,000$840,000None
4$64,000,000$0.0213334,68746.88x$960,000$1,800,000None
5$128,000,000$0.0426672,34323.44x$1,920,000$3,720,000$12,800,000
6$256,000,000$0.0853331,17111.72x$3,840,000$7,560,000$25,600,000
7$512,000,000$0.1706675855.86x$7,680,000$15,240,000$51,200,000
8$1,024,000,000$0.3413332922.93x$15,360,000$30,600,000$102,400,000
9$2,048,000,000$0.6826671461.46x$30,720,000$61,320,000$204,800,000
10$4,096,000,000$1.365333730.73x$61,440,000$122,760,000$409,600,000

Q Nation may never be sold for $3B.

How each column is worked out: - Price per Q = valuation / 3,000,000,000. Round 1: $8,000,000 / 3,000,000,000 = $1/375 = $0.002667. - Q per $100 = $100 / price, rounded down to whole Q (rounds 4 to 10 round down from 4,687.5, 2,343.75, 1,171.875, 585.9375, 292.96875, 146.484375 and 73.2421875). - Multiple = $3,000,000,000 / valuation. Round 1: 375x, so 37,500 Q bought for $100 is paid $37,500 if Q Nation is sold for $3B. - Round raises = 45,000,000 Q x price. Round 1: 45,000,000 x $1/375 = $120,000. - Revenue gate = valuation / 10, from round 5 on.

S02

4.2 The revenue gate

  • Rounds 1 to 4 have no gate. Together they raise up to $1,800,000.
  • From round 5, a round opens only when Q Nation's yearly revenue run rate is at least one tenth of that round's valuation. Round 5 needs $12,800,000 a year, round 10 needs $409,600,000.
  • Two audited quarters. A gated round opens when the last two audited quarters, each times four, are both at or above its gate, net of refunds and leaving out revenue from accounts CHECKS has flagged. Both quarters are published on OPEN BOOKS. If a later audited quarter falls back below the gate, the round pauses, and it opens again only after two quarters in a row back above it.
  • The revenue counts only what Q Nation keeps from customers it does not control: no round money, no purchases paid with Q, and no payments from Q Nation Engineering, the team or companies they own.
  • From round 5, no round sells Q above ten times Q Nation's yearly revenue.
  • Each round opening is announced on the 24/7 show and in the Telegram channel. Posts about Q carry no bought views or reactions, and no team-run account posts, reacts or replies about Q.

The model runs round 5's $12,800,000 gate through five histories of audited quarters (gate_states()):

AUDITED QUARTERS, AS A YEARLY RUN RATE SPECIFICATION · 5 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
Audited quarters, as a yearly run rateRound 5
One quarter at $14,400,000
CLOSED
Two quarters at $14,400,000
OPEN
Then one at $11,200,000
PAUSED
Then one back at $14,400,000
PAUSED
Then a second at $14,400,000
OPEN

It also checks that revenue from flagged accounts is left out before the gate is read, and that rounds 1 to 4 have no gate.

S03

4.3 The buying rules

01

The lawful route comes first

Q is sold only through the lawful route for each market (section 4.6), and that route's rules come first. Under US Regulation Crowdfunding, for example, that means one registered funding portal, each buyer's yearly investment limit, and the right to cancel up to 48 hours before the round's deadline. The rules below apply within the route's rules.

02

Minimum buy: $20

The minimum purchase amount is set at twenty dollars to ensure accessible community participation while preventing dust transactions.

03

A buy is an intent

The server quotes the Q for each round part and holds that capacity for 10 minutes, at most 5% of a round per account (2,250,000 Q; $6,000 in round 1). It gives a payment memo. A hold needs the one-time identity check (section 5.6).

04

Inside the hold, the quote stands

A payment whose block time falls inside the 10 minutes gets the quoted Q. A later payment is priced on arrival, and the buyer sees the new figure before anything is final.

05

A buy that crosses into the next round

gets each part at its own round's price.

06

Settled in USDC only

Q is priced and settled in USDC. SOL is swapped to USDC inside the same transaction. Apple Pay and card buy USDC into the buyer's own Q Nation wallet first, so card disputes go to the card provider.

07

Purchases are final once the route's cancellation period, if any, has passed

There are no other refunds on request. Q is returned only for a wrong amount, a payment made while payments were off, or a flagged address. Returned Q goes back into the open round, never an earlier one.

08

Round 10 fit

Cash beyond the last Q of round 10 goes back in USDC automatically.

09

Team accounts cannot buy in rounds,

and team wallets do not sell $QUIT while a round is open. The rounds pause while a sale of Q Nation is being negotiated.

S04

4.4 Inviting friends, and the raise

Q NATION CHARTER PRINCIPLE

A friend you invite becomes an active member: you get 160 Q, they get 80 Q.

  • This Q comes from the invites and creators pot of the work pool (section 5.3), never from a round. A friend counts as active after a real buy, or real activity on 4 separate days in their first 30, and your 160 Q is paid out over their first 90 days, only while they keep using QUIT.
  • No Q is paid to anyone on the Q that invited friends buy. Securities counsel names the lawful form of any such reward before one is offered, so every round's 45,000,000 Q go to buyers, and all ten rounds raise up to $122,760,000.
  • $QUIT buys keep their own live programs, paid in $QUIT inside the buy: 5% / 1.5% / 0.5% in the creator program, and 5% / 2.5% / 1% in the partner program, which is closed for now.
S05

4.5 Where the money goes

The ten public rounds ($122,760,000) follow Q Nation's five-way operating split: build the platform 45%, reach more people 25%, run the service 15%, protect the business 10%, keep a reserve 5%. Every dollar of public round proceeds is tracked against this five-way split on OPEN BOOKS.

USE SPECIFICATION · 5 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
UseShareOf rounds 1 to 4 ($1,800,000)Of all ten rounds ($122,760,000)
Build the platform45%$810,000$55,242,000
Reach more people25%$450,000$30,690,000
Run the service15%$270,000$18,414,000
Protect the business10%$180,000$12,276,000
Keep a reserve5%$90,000$6,138,000

Q Nation Engineering, the engineering firm of The Founder (founder and Chief Engineer), builds QUIT. The build agreement between Q Nation and Q Nation Engineering is published. Any payment to a company the Founder or a team member owns is approved by the independent trustee or by THE BOARD, and shown on OPEN BOOKS. Spending is reported every quarter against the split above.

S06

4.6 When payments open

Real Q payments open market by market. In each country they switch on only when three things are true: the issuing company exists, securities counsel's written route for that country is in hand, and the country is on a list that stays shut by default. Then the Founder switches them on. Until then the payment rails run in test mode and buy no Q, and the round page reads 'ROUND 1 OF 10 · OPENING SOON' with the key 'TELL ME WHEN IT OPENS'. Where buying is not open yet, members can still earn Q.

S07

4.7 Reaching round 5

Rounds 1 to 4 raise at most $1,800,000. Round 5 opens only once Q Nation's audited revenue runs at $12,800,000 a year. Three things cover the gap:

  • The Strategic Founding Reserve (300,000,000 Q) sits inside the Rounds Vault's 25% before Public Round 1 opens, establishing the initial $400,000 operating cash reserve modeled in cash_plan() under counsel-approved institutional exemptions.
  • A hard monthly cost cap. A month's costs are at most 1/12 of the cash on hand plus that month's contribution, so cash always covers twelve months at the current spend.
  • A dated cash plan in the model (cash_plan()), which stops the run if cash ever goes below zero.

The cash plan runs month by month from January 2027 to December 2029, in three cases:

CASE SPECIFICATION · 3 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
CaseReal members, Dec 2029Revenue a member a yearRounds 1 to 4 sell overRound moneyGated rounds openedMonths the cap cuts costsFirst payoutLowest cashCash up front to run the planned costsThat cash in Q at round 4's price
Low36,000$3030 months$1,800,000none36 of 36none$295,004$6,337,139297,053,405
Base1,000,000$3018 months$3,720,000round 5 in Jul 202914 of 36Jun 2029$368,647$2,628,301123,201,592
High1,000,000$609 months$5,640,000round 5 in Apr 2029, round 6 in Oct 20298 of 36Dec 2028$415,556$1,967,68292,235,087

What the plan shows, on these assumptions: - No case runs out of cash, because the cap cuts spending first. - In every case the cap cuts the planned $200,000 a month for the first months. In the low case it cuts all three years. - The cash needed up front to run the planned costs uncut is $1,967,682 to $6,337,139. At round 4's price it fits inside the 270,000,000 Q of rounds 5 to 10 in the base and high cases; in the low case it would take 297,053,405 Q. At round 1's price it would take 737,880,695 to 2,376,427,243 Q, more than the 450,000,000 Q all ten rounds hold.

Assumptions. Q Nation's plans set no costs. The cash plan uses these figures, each listed with its basis in tokenomics.json (assumptions): - Planned fixed costs of $200,000 a month, and $2 a real member a year of variable cost. - Contribution: revenue after 2% refunds, times the blended contribution margin of the costed revenue lines, 39.9% (section 8.3). - Members grow on two paths: the plan's pace, to 1,000,000 real members in 12 quarters, and slow growth, to 36,000. - Revenue per real member at half the plan ($30 a year) and at the plan ($60). - Rounds 1 to 4 sell evenly over the months shown. An open gated round sells its 45,000,000 Q evenly over 6 months, and only while its gate reads OPEN on audited quarters, which land one quarter after each quarter ends. - An initial $400,000 operating cash reserve sits on hand at the January 2027 plan start (starting_operating_reserve_usd). Round money in the table is the ten public rounds' proceeds, and the bridge figure is on top of that initial operating reserve. - Payouts follow section 11.2, and THE Q WINDOW takes the most section 11.4 allows. - The plan starts in January 2027, the month after the issuing company is named. Round money is counted as cash on hand; the five-way public round allocation in section 4.5 and the build agreement with Q Nation Engineering are reported separately on OPEN BOOKS.


VAULT BAY 05 OF 17

5. The work pool

40% of Q Nation, 1,200,000,000 Q, is paid for work. It is not released by the calendar. It is released by real members: people who are signed in, checked, have taken a real action in the last 30 days, and are not a team account. (The community's weekly number counts the last 7 days. The release and the unlocks use the 30-day count.)

A real action is one of three, a closed list kept in the model (REAL_ACTIONS): paid work that passed its check (a job, task, raid, bounty or event), a buy (Q in a round, $QUIT through Q Nation, or a shop or plan payment), or a course passed in THE ACADEMY. Signing in, free play, holding alone, sending invites, profile changes, XP and badges do not keep anyone a real member.

The highest count releases. The work pool releases on the highest audited count of real members ever reached. If the count dips, nothing more is released until it passes its old high, and nothing already released is taken back.

S01

5.1 The five stages

The 1,200,000,000 Q five-stage halving reservoir and seven daily potsEXPAND 2K
FIVE-STAGE HALVING RELEASE SCHEDULE · 5 STAGESCONSTITUTIONAL INVARIANT · VERIFIED
StageReal membersQ released in the stageShare of the poolQ per new real memberReleased in total by the end
10 to 100,000120,000,00010%1,200120,000,000
2100,000 to 1,000,000240,000,00020%266.7360,000,000
31,000,000 to 10,000,000360,000,00030%40720,000,000
410,000,000 to 100,000,000300,000,00025%3.31,020,000,000
5100,000,000 to 1,000,000,000180,000,00015%0.21,200,000,000

Q per new real member = the stage's Q / the members the stage spans. Stage 1: 120,000,000 / 100,000 = 1,200. Stage 2: 240,000,000 / 900,000 = 266.7. Early work earns the most Q, by design.

S02

5.2 The release function

Example: at 550,000 members, stage 1 is complete (120,000,000) and stage 2 is half done: (550,000 - 100,000) / 900,000 = 0.5, so 0.5 x 240,000,000 = 120,000,000 more, 240,000,000 in all.

The model tests a dip: 125,333,333 Q are released and paid out at 120,000 audited real members, and the count then falls to 90,000. Reading the highest count, the ledger's checks still hold. Reading the current count, the release would fall to 108,000,000 Q, below what has already been paid, and the check would fail on a valid history.

S03

5.3 The seven pots

Every release is split into seven pots.

SEVEN WORK POOL POTS LEDGER · 8 POTSCONSTITUTIONAL INVARIANT · VERIFIED
PotShareStage 1, per new real memberStage 1 sizeAll five stages
THE JOB BOARD (tasks, raids, bounties, events)30%360 Q36,000,000360,000,000
Invites and creators20%240 Q24,000,000240,000,000
MINING (holding $QUIT)20%240 Q24,000,000240,000,000
Games10%120 Q12,000,000120,000,000
THE ACADEMY10%120 Q12,000,000120,000,000
DEPARTMENTS and cups5%60 Q6,000,00060,000,000
Reserve and appeals5%60 Q6,000,00060,000,000
Total100%1,200 Q120,000,0001,200,000,000

Each pot in each stage, in Q (pot share x the stage's Q):

SEVEN WORK POOL POTS LEDGER · 7 POTSCONSTITUTIONAL INVARIANT · VERIFIED
SWIPE HORIZONTALLY TO INSPECT ALL 6 COLUMNS
PotStage 1Stage 2Stage 3Stage 4Stage 5
THE JOB BOARD36,000,00072,000,000108,000,00090,000,00054,000,000
Invites and creators24,000,00048,000,00072,000,00060,000,00036,000,000
MINING (holding $QUIT)24,000,00048,000,00072,000,00060,000,00036,000,000
Games12,000,00024,000,00036,000,00030,000,00018,000,000
THE ACADEMY12,000,00024,000,00036,000,00030,000,00018,000,000
DEPARTMENTS and cups6,000,00012,000,00018,000,00015,000,0009,000,000
Reserve and appeals6,000,00012,000,00018,000,00015,000,0009,000,000

What each pot pays for: - THE JOB BOARD: checked work. Tasks, raids, bounties, events and activations. - Invites and creators: a friend who becomes a really active member, and creators with 10,000+ followers who post Q Nation's reels with your link. - MINING (holding $QUIT): a daily share for long-term holders (section 6). - Games: the weekly games pot (section 7). - THE ACADEMY: finishing courses, and bigger amounts for teaching one. - DEPARTMENTS and cups: the weekly Department Cup and crew pots. - Reserve and appeals: corrections when a member wins an appeal.

S04

5.4 Stage 1 example pay

WORK SPECIFICATION · 8 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
WorkWhat it isStage 1 example payPotHow it is checked
TaskPost a reel, translate a page, test a screen, answer a questionabout 50 QJob boardAutomatic where the platform can confirm it, otherwise a reviewer
Raid actionWrite a real reply or make a post about Q Nation from your own account. Every paid post starts 'Paid 10 Q by Q Nation #ad', with the real amount.about 10 Q an action, capped dailyJob boardThe platform's own data
BountyBuild a feature, make a course, design a sticker set, find a bug1,000 to 50,000 QJob boardA reviewer, then THE BOARD for the biggest
Event hostedA meetup, a campus day, a watch party, a launch nightabout 5,000 QJob boardCheck-in codes from attendees
Active member broughtA friend who becomes a really active member160 Q to you, 80 Q to themInvites and creatorsOnly after a real buy, or real activity on 4 separate days in their first 30. Your 160 Q is paid out over their first 90 days, only while they keep using Q Nation
Creator broughtA creator with 10,000+ followers who posts Q Nation's reels with your linkabout 2,500 QInvites and creatorsThe post is confirmed, and you have passed the identity check
Course taughtTeach a course in THE ACADEMYabout 25,000 QAcademyThe course is published in THE ACADEMY
Course finishedFinish a courseabout 100 QAcademyCourse completion

Q pays for checked work, not empty clicks. The invite amounts come straight from the pot: the invites and creators pot receives 20% x 1,200 = 240 Q per new real member in stage 1, split 160 Q to the inviter and 80 Q to the newcomer. The model checks that 160 + 80 = 240.

In later stages the same work earns less Q, because each new member releases less. The invites and creators pot receives 240 Q per new member in stage 1, 53.3 Q in stage 2 (20% x 266.7) and 8 Q in stage 3 (20% x 40).

S05

5.5 How a pot sets its amounts each day

Each pot has a budget for the day, worked out by pot_days() in the model:

today's budget for a pot     = (Q in the pot + Q the rest of the stage will add to it) / the expected days left in
                               the stage, never more than the pot holds
today's amount for an action = today's budget / the number of those actions expected today

The MINING and games pots work differently: each release into them is paid out evenly over the next 180 days, so their daily amount is the sum of the last 180 days' releases divided by 180. That is the live daily rate the site shows, set by new members joining.

At 300 new real members a day and 1,000 paid actions a day on THE JOB BOARD, a task pays 108 Q. On a day when 3,300 people join at once, it pays 122 Q, and the extra Q stays in the pot for the days that follow. Without the daily budget that one day would pay 1,188 Q a task.

Once joins have held at one rate for 180 days, each pot pays a steady amount a day (pot_daily):

SEVEN WORK POOL POTS LEDGER · 7 POTSCONSTITUTIONAL INVARIANT · VERIFIED
SWIPE HORIZONTALLY TO INSPECT ALL 6 COLUMNS
PotStage 1, 100 joins a dayStage 1, 300 a dayStage 1, 1,000 a dayStage 2, 300 a dayStage 3, 300 a day
THE JOB BOARD36,000108,000360,00024,0003,600
Invites and creators24,00072,000240,00016,0002,400
MINING (holding $QUIT)24,00072,000240,00016,0002,400
Games12,00036,000120,0008,0001,200
THE ACADEMY12,00036,000120,0008,0001,200
DEPARTMENTS and cups6,00018,00060,0004,000600
Reserve and appeals6,00018,00060,0004,000600

The model checks every day that no pot pays more than it holds or more than it has received.

  • The amount is shown before you act and held for you at that moment.
  • When a pot is empty for the day, it shows "FULL TODAY".
  • Q a pot does not pay out stays in that pot.
  • Every earned Q waits 7 days while it is checked (WAITING), then becomes READY.
  • THE WORK EXCHANGE (CASH JOBS) pays members in cash from the business plus Q. The business has 3 days to approve or raise a problem; after 3 days the pilot is paid automatically.
S06

5.6 Keeping it fair

Botting is made to pay nothing: 1. Every earned Q waits 7 days while it is checked. 2. One person, one account: the sign-in plus a phone or a Telegram account. Virtual and VoIP numbers are refused. 3. Games run on Q Nation's server, which deals and replays every round (section 7). 4. Daily and weekly caps per person. Invites pay only after a real buy or real activity on 4 separate days, and the inviter's Q is paid out over the newcomer's first 90 days, only while the newcomer keeps using QUIT. 5. CHECKS groups accounts that share a funding wallet, device or address range, and holds them for a person to review. Members can appeal. 6. CREWS with vouching: you vouch for the people you bring in, and you lose Q if someone you vouched for turns out to be fake. 7. A share of paid work is re-checked at random. Anything paid in error is taken back through the ledger, with appeal. 8. Team-run accounts never earn Q and never count as members. 9. An outside firm audits the real-member count, with the method published, before any founder or team unlock, and the count must hold at or above the mark for 90 days in a row. 10. A one-time identity check comes before anything that pays cash or a large amount of Q: profit payouts, THE Q Nation WINDOW, the people's dividend, MINING, games Q, featured-coin votes, creator bounties and round holds. Everyone else keeps playing and earning small amounts of Q.


VAULT BAY 06 OF 17

6. MINING: holding $QUIT

The MINING pot is the work pool's holding share: 20% of every work pool release, 24,000,000 Q in stage 1 (240 Q per new real member) and 240,000,000 Q across all five stages. It is a reward for long-term holders of $QUIT, paid from the work pool. $QUIT itself is priced by the market and can fall to near zero; the Q it earns does not protect that price.

Four $QUIT deflationary supply sinks and constant-product AMM reserve depthEXPAND 2K
S01

6.1 How the daily share is worked out

Every UTC day (00:00 to 24:00 UTC) the day's MINING amount is shared by weight:

your Q for the day = (your weight / the total weight of all eligible accounts) x the day's MINING amount

weight of an account = sum over its $QUIT of
                       amount x age bonus x never-sold bonus

The day's MINING amount is the live daily rate of section 5.5. Each release into the MINING pot is paid out evenly over the next 180 days, so the rate is set by new members joining. Once joins have held at one rate for 180 days, the pot pays this much a day:

STAGE 1 DAILY JOIN PACE & RUNWAY LEDGER · 3 SCENARIOSCONSTITUTIONAL INVARIANT · VERIFIED
New real members a dayStage 1Stage 2Stage 3
10024,000 Q5,333 Q800 Q
30072,000 Q16,000 Q2,400 Q
1,000240,000 Q53,333 Q8,000 Q

If nobody new joins, no new Q enters the pot, and the Q already in it keeps paying out over its 180 days.

S02

6.2 The age ladder

HELD FOR SPECIFICATION · 5 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
Held forAge bonus
Under 30 days
1x
30 days
1.5x
90 days
2x
180 days
3x
1 year
5x

Age counts from the real buy date on the chain.

S03

6.3 The rules

01

Lowest daily balance

Each day's weight uses the account's lowest $QUIT balance during that day, read from the full transfer history. Holding over midnight for a few minutes earns nothing.

02

Never sold: x2

This is an account rule over all the account's linked wallets. Moves inside that set are ignored. Any sale, or any send to an address outside the set, ends it for the account.

03

The EX-EMPLOYEES NFT

Its +25% applies to game rounds and perks, not to MINING. The EX-EMPLOYEES airdrop keeps its own rules.

04

Which coins earn

Coins the account bought from a pool, $QUIT paid to it by the referral program, and coins moved between its own linked wallets. Coins received from any other address earn nothing.

05

Selling

The coins you sell stop earning. The newest coins count as sold first, so the rest keep their age.

06

Eligibility

At least 10,000 $QUIT across the account's linked wallets. The weight is linear, so splitting coins across wallets gains nothing.

07

Identity check

MINING pays only after the one-time identity check (section 5.6).

08

Where Q is open

MINING Q is paid only where Q is open. Elsewhere a MINING balance builds up and turns into Q when Q opens there.

09

Before MINING starts,

securities counsel gives its opinion on $QUIT. Team wallets do not sell $QUIT while a round is open.

10

Excluded

The team registry (wallets, Telegram ids and sign-in ids of every project-operated, operational, treasury, and team-register wallet or account), and every wallet funded by them or trading in step with them; exchanges and pools. The independent trustee and the auditor get the list. A wallet first funded from a registry wallet goes to CHECKS.

11

Unknown history

A wallet whose history cannot be read that day earns nothing that day and shows "checking", never zero and never a guess.

S04

6.4 Example

For example, in February 2027: Alex holds 1,250,000 $QUIT, bought 94 days earlier and never sold.

1,250,000 x 2 (held 90+ days) x 2 (never sold) = 5,000,000 weight

With 300 new real members joining each day in stage 1, the day's MINING amount is 72,000 Q, and Alex's Q for the day is 72,000 x 5,000,000 / the total weight of all eligible accounts. Alex's EX-EMPLOYEES NFT adds to game rounds and perks, not to this weight.


VAULT BAY 07 OF 17

7. The games pot

Live 5-Game Browser Arcade Powering the Weekly 10% Games PotEXPAND 2K

The games pot is 10% of every work pool release: 12,000,000 Q in stage 1 (120 Q per new real member) and 120,000,000 Q across all five stages. Each release into it is paid out evenly over the next 180 days (section 5.5), so the week's games pot is seven days of that daily amount. It is paid out weekly, split by checked score.

counted score (each day, each game) = the smaller of your checked score
                                      and the 90th-percentile human score for that game that day

your Q for the week = (your counted score / everyone's counted score) x the week's games pot,
                      at most 2% of the week's pot
01

The P90 cap

The score that counts each day is capped at the score 90% of human players do not beat, worked out over identity-checked accounts with a playing history. A perfect bot earns no more than a good player.

02

Identity check

Games Q is paid only after the one-time identity check (section 5.6).

03

2% cap per person

No one takes more than 2% of a week's pot, so every week's pot is shared by at least 50 people (100% / 2%).

04

Your running estimate

Members see "your share of this week's pot" as it builds.

05

Free rounds

Three a day. Two more for each invited friend who plays (at most 6 extra a day). Two more for holders of 250,000+ $QUIT.

06

Server-dealt rounds

A signed-in account asks for a round, the server issues a seed, the phone returns its tap log, and the server replays the round with the same game code and scores it. Impossible inputs fail.

07

Which games pay Q

The throw games (Paper Boss, Dunk the Boss, Overlord Toss) pay Q. The arcade's five games are score only for now, until each runs on server-dealt rounds. Chair Rally pays points. Practice is always free and never pays.


VAULT BAY 08 OF 17

8. Builders

300,000,000 Q Builders Vault and Enterprise Work Exchange ConsoleEXPAND 2K

Builders and leaders hold 10% of Q Nation: 300,000,000 Q. Marketers, bloggers, network leaders and agencies who bring real paying customers earn Builder Units under the live Builders plan.

1 Builder Unit = 30 Q. 10,000,000 Builder Units x 30 = 300,000,000 Q.

S01

8.1 Cash pay (paid in USDC to the Builder's Q Nation wallet)

WHAT SPECIFICATION · 4 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
WhatPay
Each customer you bring
25% of every payment, every month they stay
A customer's first month
40% instead of 25%
Customers of builders you bring
5%, 3%, 2%, 1%, 1%, 1%, 1% across seven levels, opened by rank
A business's Work Exchange jobs
The same rates, on Q Nation's share of each job after card fees, inside the 45% cap (section 8.3)

Builder commissions on card sales are paid in USDC from company funds, never through the card processor. On a Creator Studio plan paid partly with Q, the commission is paid on the card part only. Nothing is ever bought to join or to earn, and ranks rise only with real customers.

S02

8.2 Builder Units, and the Q they become

01

Points

Each month a Builder earns one point per dollar of their customers' revenue that stays 90 days, plus 25% of the same for their team, within the seven paid levels.

02

The rate halves every 2,000,000 units,

across five tranches. Early builders earn the most per dollar.

03

The rates are working figures

The Builders plan puts tranche 1 at about 0.03 units a point and sets the final tranche 1 rate from its cohort model. Each later tranche pays half the one before.

TRANCHE SPECIFICATION · 6 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
TrancheBuilder Units in the trancheQ in the tranche (units x 30)Units per point (working figure)Q per point (x 30)
12,000,00060,000,0000.030.9
22,000,00060,000,0000.0150.45
32,000,00060,000,0000.00750.225
42,000,00060,000,0000.003750.1125
52,000,00060,000,0000.0018750.05625
Total10,000,000300,000,000
  • When it becomes yours. Each quarter's units become yours over three years, a third after the first year. A Builder who leaves keeps what has become theirs, and the rest returns to the pool. Units are forfeited for fraud.
  • What Builder Q earns. Once it is yours, Builder Q is paid like every Q: profit payouts and any sale.
  • Leaders who bring really active members also earn from the invites and creators pot (section 5).
S03

8.3 Work Exchange jobs, and the margin of each revenue line

Builders who bring a business earn their commission on Q Nation's share of its jobs. On a $150 job, Q Nation keeps $30 and the pilot gets $120 plus Q. The commission is paid on the $30 after card fees, inside the Builders' 45% cap on field pay. No commission is paid where the business, the pilot and the Builder share a device, a funding source, an invite tree or a crew.

What Q Nation keeps on one $150 job, from wx_job() in the model, after a card fee of 3.5% + $0.30 ($5.55), $5 of AI work and a 1% reserve for card disputes ($1.50), each an assumption stated in the model:

THE JOB SPECIFICATION · 4 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
The jobBuilder payQ Nation keeps
A business that came direct$0.00$17.95
A Builder-brought business, first month (40% plus seven levels, capped at 45%)$11.00$6.95
A Builder-brought business, later months (25% plus seven levels, 39%)$9.54$8.41
Business, pilot and Builder related$0.00$17.95

The model checks that Q Nation keeps money on every one of these jobs.

The margin of each revenue line, after the costs of each sale (card fees, AI work, posting, Builder pay and Q back):

01

CREATOR STUDIO

39.7% of the cash paid, blended over the plans, Builder-sold and direct, card and half Q. Two cells lose money at full use, STARTER and WEEKLY sold by a Builder and paid half with Q; the approved plans show both. The model stops if any other cell loses money.

02

GO VIRAL and GO VIRAL PLUS

53.9% and 57.3% direct, 11.9% and 15.3% when a Builder sells them.

03

THE WORK EXCHANGE

40.1% of Q Nation's share, with half of the jobs from Builder-brought businesses.

04

Blended

39.9%, with revenue split evenly between CREATOR STUDIO and THE WORK EXCHANGE.

05

THE ACADEMY and data licences

have no price or cost in the plan yet, so the model does not count them.


VAULT BAY 09 OF 17

9. The Community Treasury and THE BOARD

300,000,000 Q Community Treasury and THE BOARD governance safeguardsEXPAND 2K

The Community Treasury holds 10% of Q Nation: 300,000,000 Q. It is spent only by a vote on THE BOARD, the Q Nation DAO.

S01

9.1 How THE BOARD works

RULE SPECIFICATION · 11 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
RuleSetting
Ideas
Any member can post an idea on the ideas wall
Proposals
A holder of 1,000,000 Q or more, or 100 members together, turns an idea into a proposal
Votes
1 Q = 1 vote. Big holders carry the most weight.
Length
7 days
Quorum
At least 5% of the Q that counts on the vote's date takes part
Treasury limit
At most 10% of the treasury in any quarter (30,000,000 Q while the treasury holds 300,000,000)
Bigger treasury spends
A spend above 0.5% of the treasury passes both houses: the Q vote, and identity-checked members voting one person, one vote. At least 15% of the Q that counts must take part. It then waits 7 days, and the trustee can stop it for a conflict of interest
Conflicts
The Founder's and the team's Q do not vote on a sale of Q Nation, on treasury spending, or on anything about their own pay. No treasury spend goes to the proposer, to a member who holds the proposer's votes, or to accounts related to either
A sale of Q Nation
Two yeses. The Q house: two thirds of the Q voting, with at least 30% of the Q that counts taking part. The members' house: a majority of the voting identity-checked members with a checked record of 90 days or more, with at least 20% of those members taking part. Never below the last round's valuation, with an independent opinion that the price is fair
Counting
Votes are signed in the office and counted from the Q ledger, with a public proof of every vote
Paying
A passed treasury spend goes out from the company multisig within 14 days

Worked numbers: - 1,000,000 Q is 1/3,000 of Q Nation (0.033%). - The quorum moves with the Q that counts. If 460,000,000 Q count on a vote's date, 23,000,000 Q must take part (5% x 460,000,000). A quorum of 5% of all 3,000,000,000 Q would need 150,000,000 Q, everything sold in rounds 1 and 2 together, and early votes could never pass. - 0.5% of a full treasury is 1,500,000 Q. A bigger spend with 460,000,000 Q counting needs 69,000,000 Q to take part (15% x 460,000,000).

S02

9.2 What THE BOARD decides

  • How the treasury is spent: education grants, profession programs, GUILDS, launchpad prizes, events, partnerships and research.
  • The big milestones, for example when live launches open on the launchpad.
  • Any rise in the profit payout above the 50% floor, and the share of profit for THE Q WINDOW.
  • Whether Q Nation is sold, with the second yes from real members.

The team runs the products and daily operations. The team can stop a vote only to protect members or to obey the law, and must say why in public. Later, the same votes move onto Solana's own governance programs.


VAULT BAY 10 OF 17

10. Founder and team unlocks

Sustained 90-Day Real-Member Milestone Unlocks for Founder and Core TeamEXPAND 2K

The Founder's 150,000,000 Q and the team's 300,000,000 Q unlock in four equal steps of 25%, set by real members. A sale of Q Nation unlocks it all, and the people's 85% still goes to the people.

SUSTAINED MEMBER MILESTONE UNLOCKS · 5 GATESCONSTITUTIONAL INVARIANT · VERIFIED
SWIPE HORIZONTALLY TO INSPECT ALL 7 COLUMNS
Real membersThe Founder's Q unlocked at this stepThe Founder's total unlockedThe Founder's total, share of Q NationTeam's total unlockedTeam's total, share of Q NationWork pool released by then
100,00037,500,00037,500,0001.25%75,000,0002.5%120,000,000
1,000,00037,500,00075,000,0002.5%150,000,0005%360,000,000
10,000,00037,500,000112,500,0003.75%225,000,0007.5%720,000,000
100,000,00037,500,000150,000,0005%300,000,00010%1,020,000,000
A sale of Q Nationthe rest150,000,0005%300,000,00010%

Each step is 25% of the holding: 150,000,000 x 25% = 37,500,000 for the Founder, 300,000,000 x 25% = 75,000,000 for the team. The last column comes from the release function in section 5.2. At every step, the work pool has released more Q for members than the Founder has unlocked.

01

Locked Q earns nothing

Q that is not unlocked takes no part in profit payouts.

02

Held for 90 days, then audited

A step unlocks only when the audited real-member count has held at or above its mark for 90 days in a row, and an outside firm has audited the count, with its method published.

03

The team

follows the same four steps. A team member's Q counts only once it is granted to that named person under a signed agreement, and vested; the trustee approves every grant, and OPEN BOOKS lists each one (section 2).

04

No buying in rounds

for team accounts.


VAULT BAY 11 OF 17

11. Profit payouts, the Q Window and the people's dividend

Open Books quarterly audited accounts, 50%+ profit payouts and the Q WindowEXPAND 2K
S01

11.1 Where profit comes from

Customers pay Q Nation for AI work and products: THE SHOP and CREATOR STUDIO, THE WORK EXCHANGE (businesses pay for AI work a member checks), TEACH THE AI (AI companies pay to use what members teach), THE ACADEMY, and launch services. Q Nation pays its costs: members' cash pay for Work Exchange jobs, data dividends to members who teach the AI, Builders' commissions, AI and servers. What is left is profit.

The launchpad fee is 1.50% of every swap: 0.60% to the coin's creator, 0.30%, 0.10% and 0.05% to three invite levels, 0.21% to the $QUIT treasury and 0.24% to Meteora. The 0.20% stays pledged to the $QUIT treasury as published. Everything else Q Nation earns is company money, and Q owns the company.

S02

11.2 Profit payouts

When Q Nation makes a profit it can pay out, at least half of it is paid each quarter to the people who own Q.

  • At least 50% of distributable profit is paid to Q holders. THE BOARD can vote to pay more.
  • Distributable profit is audited profit since the last payout, measured before non-cash Q pay, after earlier losses are made back and 6 months of operating costs are kept in reserve. The auditor signs off the method, and OPEN BOOKS publishes both lines, profit and distributable profit.
  • The first payout comes once audited profit has made back all earlier losses and the reserve is in place. Each payout uses the whole distributable amount: the payout first, then THE Q WINDOW and growth.
  • Payouts are paid in cash: USDC into each member's Q Nation wallet, after the one-time identity check.
  • The people get at least 85% of every payout. The payout is split by Q held on the payout date: bought and earned Q, Builder Q that has become the Builder's, the Founder's unlocked Q, and team Q that is granted, vested and unlocked. Every Q the people hold is paid the same. The Founder's unlocked Q is paid at the same rate up to 5% of the payout, and the team's up to 10%; anything above a limit is paid to the people's Q, and so is the share of team Q not yet granted.
distributable profit = the smaller of (audited profit since the last payout, after earlier losses are made back)
                       and (cash on hand - 6 months of operating costs), never below 0;
                       profit is measured before non-cash Q pay
payout             = at least 50% of distributable profit
Q that counts      = people's Q held + the Founder's unlocked Q + team Q granted, vested and unlocked
the Founder                = the smaller of (payout x the Founder's unlocked Q / Q that counts) and (5% of the payout)
team               = the smaller of (payout x team Q that counts / Q that counts) and (10% of the payout)
people             = payout - the Founder - team, the same amount on every people's Q

payout_schedule() in the model, on three histories:

QUARTERS, AUDITED PROFIT BEFORE Q PAY SPECIFICATION · 3 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
Quarters, audited profit before Q payWhat is paid
-$400,000, +$400,000, -$400,000, +$400,000
$0: each profit only makes back the loss before it
-$300,000, +$200,000, +$500,000
$200,000 in the third quarter, 50% of the $400,000 left once the losses are made back
$1,000,000, with $1,500,000 of cash and $200,000 a month of costs
$150,000: $1,200,000 stays as the reserve, $300,000 is distributable, and $700,000 is carried to the next payout

Example. Real members pass 100,000 and the count holds there for 90 days, so the Founder's first 37,500,000 Q and the team's first 75,000,000 Q unlock; all of the team's Q has been granted. Suppose the people hold 460,000,000 Q (the early case of section 3). The Q that counts is 460,000,000 + 37,500,000 + 75,000,000 = 572,500,000.

DISTRIBUTABLE PAYOUT SHARE LEDGER · 3 POOLSCONSTITUTIONAL INVARIANT · VERIFIED
Q that countsShare by Q aloneShare paid
The people460,000,00080.3%85%
the Founder37,500,0006.6%5% (limit)
Team75,000,00013.1%10% (limit)

For each $1,000,000 of distributable profit, at least $500,000 is paid out: $425,000 to the people, $25,000 to the Founder and $50,000 to the team. Each people's Q receives $425,000 / 460,000,000 = $0.000924. Alex, the example member of section 6.4, also holds 12,400 Q, so Alex receives 12,400 x $0.000924 = $11.46. If the issuing company is a US company and Alex lives outside the US, 30% is withheld unless a tax treaty sets a lower rate, and Alex receives $8.02.

payout_split() in the model, on a $500,000 payout:

A $500,000 PAYOUT SPECIFICATION · 5 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
A $500,000 payoutThe peoplethe FounderTeam
Before the first unlock$500,000$0$0
At the 100,000 unlock, all team Q granted$425,000$25,000$50,000
The same, half the team Q granted$439,953$25,000$35,047
The same, no team Q granted$475,000$25,000$0
Every Q issued and unlocked$425,000$25,000$50,000

Before the first unlock, the Founder's and the team's Q earn nothing from payouts, and the people receive the whole payout.

S03

11.3 The Q reference price

Outside an open round, Q has one published price each quarter, the reference price:

reference price = the smaller of (the last round's price) and
                  (10 x audited revenue over the last 12 months / 3,000,000,000)

THE Q WINDOW buys at or below it. When no round is open, THE SHOP, cash back and members' yearly statements use it. Q given as cash back is left out of a round's sold count.

Example: with $2,000,000 of audited revenue over 12 months and round 4 the last round, the reference price is 10 x $2,000,000 / 3,000,000,000 = $0.006667, below round 4's $0.021333.

S04

11.4 THE Q WINDOW

Q cannot be sold to another person. THE Q WINDOW is the one way to sell it: back to QUIT.

  • It opens from Q Nation's first profitable quarter, whatever the member count, and buys only in a quarter with profit. It is paid only from profit, never from round money.
  • Its budget. THE BOARD sets the share of the profit not paid out that goes to the Window, at most half of it.
  • Its price. At or below the Q reference price.
  • Who can offer. Bought Q after it has been held 12 months; earned Q after it has been READY for 6 months. The identity check comes before any payout.
  • How offers fill. Pro rata: every eligible offer fills the same share. No account fills more than 2% of the quarter's cap.
  • How long. The Window stays open at least 20 business days each quarter.
  • Q bought back goes to the ledger's recycled account and is paid out again as rewards.
Window budget       = THE BOARD's share x (distributable profit - payout), at most half
the quarter's cap   = Window budget / the Window's price
each account's fill = its eligible Q, at most 2% of the quarter's cap, x the same fill rate for every account

Example, from window() in the model: $500,000 of distributable profit pays out $250,000, and the Window takes half of the other $250,000, $125,000. At the reference price of $0.006667 that buys up to 18,750,000 Q, at most 375,000 Q from any one account.

OFFER SPECIFICATION · 5 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
OfferAccountsQ offered by eachEligibleFilled for each
Bought Q, held 14 months1,000100,000100,00016,988
Earned Q, READY for 7 months2,0005,0005,000849
One large holder, bought Q held 13 months15,000,000375,00063,703
Bought Q, held 6 months50020,00000
Earned Q, no identity check30010,00000

The eligible offers come to 110,375,000 Q, so each fills 17.0%.

S05

11.5 The people's dividend

At a sale of Q Nation, the value of the people's Q not yet issued (round Q not yet sold, work pool Q not yet earned by a member, Builder Q not yet earned, treasury Q not yet granted), and of team Q not yet granted and vested, is paid to real members as a one-time people's dividend. Section 3.3 shows its size: $2,090,000,000 in the early case at $3B, $1,550,000,000 in the middle case and $0 in the late case.

weight of a member = Q earned through checked work x the days it has been held,
                     counted from the member's first checked job, at most 5 x the median weight
member's dividend  = the dividend x the member's weight / the sum of all weights

Only real members on the record date who have passed the identity check take part. A member with no checked work has no weight.

Example, from dividend_split() in the model: a $60,000,000 sale at 100,000 real members, with 460,000,000 of the people's Q issued, leaves a dividend of $41,800,000. Of the 152,050 accounts in the example, 85,050 qualify. The median member receives $226, and nobody receives more than 5 times that, $1,128.

GROUP SPECIFICATION · 7 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
GroupAccountsEach receives
Real members, light checked work60,000$225.64
Real members, regular checked work20,000$1,128.21
Real members, heavy checked work5,000$1,128.21
Network leaders50$1,128.21
Real members with no checked work15,000$0
Scripted accounts active 330 days, no checked work50,000$0
Checked work, no identity check2,000$0
S06

11.6 Where cash lands

Every cash earning (Work Exchange pay, profit payouts, Builder commissions, Q Window sales) lands as CASH in the member's Q Nation wallet, in USDC. From there the member chooses: spend it with THE Q CARD, send it to a bank, send it to mobile money, or send it to any crypto wallet.

Every quarter, OPEN BOOKS shows revenue, costs, profit, distributable profit, payouts, the Q reference price, revenue per real member, every grant of team Q, and the AI desk's full record of trades, wins and losses.


VAULT BAY 12 OF 17

12. Spending Q, claims and the Q Card

Unified Q Wallet, Weekly Solana Claims and Single-Tier Q CardEXPAND 2K
S01

12.1 Spending Q

01

Spent Q is not destroyed

It goes to the ledger's recycled account and is paid out again as rewards. Your share of Q Nation falls by the Q you spent.

02

Up to half of a shop price

can be paid with Q, at the open round's price, or at the Q reference price when no round is open (section 11.3). Q spending is capped per account per month in dollars.

03

5% of every card payment in THE SHOP comes back in Q,

at the open round's price, or at the Q reference price when no round is open. Cash-back Q is left out of a round's sold count.

Example, Creator Studio at $49 with round 1 open ($1/375, about $0.002667 a Q, so 375 Q for each dollar): - Up to half with Q: $24.50 x 375 = 9,187.5 Q. - 5% back on a $49 card payment: $2.45 x 375 = 918.75 Q. - With no round open and a reference price of $0.006667, the same 5% back is $2.45 / $0.006667 = 367 Q.

S02

12.2 Claims

  • Q Nation's ledger is the record. A member can claim READY Q into their own Solana wallet.
  • Claims run weekly, from 1,000 READY Q. Each week the company multisig approves one batch of that week's claims, and members claim against it.
  • Q Nation pays the cost: the network fee, and the rent for each new holder account, about 0.0021 SOL. For 1,000,000 claimers that is about 2,100 SOL (0.0021 x 1,000,000).
  • Claimed Q cannot be sent or sold. It is a Solana token that cannot be transferred, with 6 decimals, named Q with the Pyramid-Q image.
  • Taking Q back. The company multisig can take back claimed Q only for published reasons: Q spent, Q returned for a wrong payment, or fraud found by CHECKS after appeal. Each use is logged in public with its reason, and a waiting period passes before it takes effect.
  • Spending claimed Q burns it once the member confirms. If an owner burns their own Q on chain, the next batch mints it again, because the ledger is the record.
  • Claims open after a test claim shows correctly in Phantom, Solflare, Backpack and the Privy wallet.

Check your Q is counted. Every day the ledger publishes one fingerprint of all member balances (a Merkle-sum root), and each member can check with a proof in the Wallet that their Q is counted in it. The proof is built on SHA-256 hashes, which known quantum attacks do not break at this size.

S03

12.3 THE Q CARD

  • Spends cash earnings anywhere cards are taken, and in Apple Pay and Google Pay: profit payouts, commissions, Work Exchange pay and USDC.
  • Q back on every purchase, except at cash-like merchants. Q back is paid only from the interchange Q Nation receives on card spending, at a rate below it, capped per verified person each month, and only after the identity check. The rate is set once the card provider is chosen; the model holds no rate until then (card_q_back()).
  • One Q Card, for every member.
  • $QUIT and Q are never spent by card.
  • The card provider runs the ID check. The card program starts once a provider is chosen; until then, cash moves to a bank, mobile money or a crypto wallet.
S04

12.4 Questions members ask

01

Can my children inherit my Q?

Q moves only by legal process (death, divorce, a court order), handled by the registrar.

02

What if I lose my phone?

The ledger is the record. Account recovery restores your access.

03

Do I pay tax?

Payouts and earned Q may be taxable where you live. Q Nation sends each member a yearly statement of what they received, with Q valued at the open round's price, or at the Q reference price when no round is open. The issuing company's country sets the tax taken from payouts at source (section 11.2).


VAULT BAY 13 OF 17

13. Paths to a million

Earned Q Ownership Archetypes and Stage 1 Population Stress TestsEXPAND 2K

What 1 Q is worth is simple: Q Nation's value divided by 3,000,000,000.

VALUATION & OWNERSHIP PAYOUT SCENARIOS · 4 TIERSCONSTITUTIONAL INVARIANT · VERIFIED
If Q Nation is worth1 Q is worth$1,000,000 is
$300,000,000$0.1010,000,000 Q
$3,000,000,000$11,000,000 Q
$30,000,000,000$10100,000 Q
$300,000,000,000$10010,000 Q

Four people, one year of work in stage 1, at the stage 1 example pay of section 5.4. The last two columns are the Q each can expect when more members work (see below):

MEMBER EARNING PROFILES & STAGE 1 PAYOUTS · 4 PROFILESCONSTITUTIONAL INVARIANT · VERIFIED
PersonThe work in stage 1, at the example pay per actionQ earned at the example payIf Q Nation is sold for $3BWorth $1M when Q Nation is worthExpected Q if 10% of members workExpected Q if 25% work
Illustrator who teachesTeaches 1 course at 25,000 Q, hosts 4 events at 5,000 Q (20,000), 150 tasks at 50 Q (7,500), 600 raid actions at 10 Q (6,000), finishes 4 courses at 100 Q (400)58,900$58,900$50.9B19,8227,930
Student or new starter150 tasks at 50 Q (7,500), 400 raid actions at 10 Q (4,000), brings 10 active members at 160 Q (1,600), finishes 6 courses at 100 Q (600)13,700$13,700$219B3,5941,399
Marketer or bloggerBrings 20 creators at 2,500 Q (50,000) and 500 active members at 160 Q (80,000), 200 tasks at 50 Q (10,000)140,000$140,000$21.4B51,43828,206
Community leader who runs a departmentBrings 5,000 active members at 160 Q (800,000), hosts 12 events at 5,000 Q (60,000), 100 tasks at 50 Q (5,000)865,000$865,000$3.47B163,23846,244

How the columns are worked out: - Q earned = the sum of each action x its stage 1 example pay. Example: 25,000 + 4 x 5,000 + 150 x 50 + 600 x 10 + 4 x 100 = 58,900. - If Q Nation is sold for $3B, each Q is paid $1. - Worth $1M when Q Nation is worth = $3,000,000,000 x $1,000,000 / Q earned. Illustrator: 3,000,000,000 x 1,000,000 / 58,900 = $50.9B. - A member brought counts only after a real buy, or real activity on 4 separate days in their first 30. (In the model code the community leader is labelled "Network leader".) - The expected Q columns come from population_check(), with 10% or 25% of stage 1's 100,000 real members working in the same proportions as the example mix below.

The example mix check. The model checks that one hand-picked mix fits inside every stage 1 pot at the example pay: 8 community leaders, 50 marketers, 200 teaching professionals and 2,000 students, 2,258 people in all, 2.26% of stage 1's 100,000 real members. Together they use 59,900,000 of the stage's 120,000,000 Q and bring 85,000 of its 100,000 members.

SEVEN WORK POOL POTS LEDGER · 3 POTSCONSTITUTIONAL INVARIANT · VERIFIED
Stage 1 potUsed by the four kinds of peoplePot size
THE JOB BOARD30,720,00036,000,000
Invites and creators (including 80 Q to each newcomer)22,900,00024,000,000
THE ACADEMY6,280,00012,000,000

The whole stage. Each pot sets its pay every day from what it has left (section 5.5), so when more people do the same work, each action pays less Q, and no pot is ever overdrawn. population_check() works out what THE JOB BOARD pays against the example, and the Q each active member can expect, as more of stage 1's members work. In each case the members who do not work earn only the 80 Q a newcomer receives.

MEMBER EARNING PROFILES & STAGE 1 PAYOUTS · 5 PROFILESCONSTITUTIONAL INVARIANT · VERIFIED
Who works in stage 1THE JOB BOARD pays, against the exampleExpected Q per active memberThe student's year
The example mix, 2.3% of members100%23,51613,700
10% of members, in the example proportions26.5%6,6533,594
25% of members, in the example proportions10.6%2,7311,399
10% of members, all working like the student31.3%5,8005,800
50% of members, all working like the student6.3%1,2801,280

Q earned later, in bigger stages, is smaller per action, which is why being early matters. Each figure is what the Q would be worth if Q Nation were sold at that value; none is a forecast.


VAULT BAY 14 OF 17

14. The five phases

Five member phases to one billion owners and D27 valuation sensitivityEXPAND 2K

Each phase is set by real members. What Q Nation could be worth in each phase rests on two assumptions, stated once here: a yearly revenue per real member, and a multiple of that revenue. The plan uses 10 times; section 14.1 shows the range on other assumptions. 1 Q is worth Q Nation's value divided by 3,000,000,000 (section 13).

PHASE SPECIFICATION · 5 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
PhaseReal membersRevenue per member a year (assumption)Yearly revenue
I. Launchto 100,000$60$6,000,000
II. Launchpad liveto 1,000,000$80$80,000,000
III. AI workers for everyoneto 10,000,000$100$1,000,000,000
IV. Globalto 100,000,000$120$12,000,000,000
V. The people's economyPEOPLE 85%to 1,000,000,000$300$300,000,000,000

Example, phase I: 100,000 x $60 = $6,000,000 a year.

What each phase opens, and what it releases:

SUSTAINED MEMBER MILESTONE UNLOCKS · 5 GATESCONSTITUTIONAL INVARIANT · VERIFIED
PhaseWhat opensWork pool stage, released by the endThe Founder's Q unlocked by the endRounds open at the phase's assumed revenue
I. LaunchPEOPLE 85%Q, YOUR OFFICE, THE JOB BOARD, THE ACADEMY, Dunk the Boss, THE BOARD; THE PEOPLE'S CHARTER, OPEN BOOKS, proof-gated rounds, WORK PASSPORT, CREWS, the first paid pilot jobs and grading tasksStage 1, 120,000,00037,500,0001 to 4 (round 5 needs $12,800,000)
II. Launchpad liveLive launches, Chair Rally, the shop at full size, DEPARTMENTS worldwide; the first data licence, TRANSITION PARTNERS, GUILDS pilotsStage 2, 360,000,00075,000,0001 to 7 (round 8 needs $102,400,000)
III. AI workers for everyoneA personal AI worker for each member; GUILDS at scale; THE WORK EXCHANGE as the main incomeStage 3, 720,000,000112,500,000All ten
IV. GlobalAI services marketplace, every language, quantum-ready treasury vaults; THE WORK PROTOCOL for outside AI companiesStage 4, 1,020,000,000150,000,000All ten
V. The people's economyPEOPLE 85%One billion owners of the AI that works for themStage 5, 1,200,000,000150,000,000All ten

THE Q WINDOW is not on this clock: it opens from Q Nation's first profitable quarter, whatever the member count (section 11.4).

The last column compares each phase's assumed yearly revenue with the round gates in section 4.1: phase II's $80,000,000 passes round 7's gate ($51,200,000) but not round 8's ($102,400,000).

Where revenue per member comes from. Q Nation is paid a share of the work its members do, not for their attention, so the number grows with the work. As an example of the arithmetic, $300 a year per member is a 20% share of $125 a month of jobs that member pilots on THE WORK EXCHANGE ($300 / 0.20 / 12 = $125). OPEN BOOKS publishes the actual revenue per real member every quarter, so each assumption is tested in public.

S01

14.1 What Q Nation could be worth, on other assumptions

The value of Q Nation in each phase moves with both assumptions. The first table takes half the plan's revenue per member, the plan, and 1.5 times the plan, each at 5 and at 10 times yearly revenue. Half the multiple, or half the revenue per member, halves every value.

REVENUE & VALUATION SENSITIVITY MATRIX · 5 PHASESCONSTITUTIONAL INVARIANT · VERIFIED
PhaseReal membersPlan revenue a member a year5x revenue, half the plan5x revenue, plan5x revenue, 1.5 times the plan10x revenue, half the plan10x revenue, plan10x revenue, 1.5 times the plan
I. Launch100,000$60$15M$30M$45M$30M$60M$90M
II. Launchpad live1,000,000$80$200M$400M$600M$400M$800M$1.2B
III. AI workers for everyone10,000,000$100$2.5B$5B$7.5B$5B$10B$15B
IV. Global100,000,000$120$30B$60B$90B$60B$120B$180B
V. The people's economyPEOPLE 85%1,000,000,000$300$750B$1.5T$2.25T$1.5T$3T$4.5T

The second table values Q Nation on gross profit instead of revenue: yearly revenue after the costs of each sale, at the blended contribution margin of the costed revenue lines (section 8.3), times 10.

REVENUE & VALUATION SENSITIVITY MATRIX · 5 PHASESCONSTITUTIONAL INVARIANT · VERIFIED
PhaseYearly revenue (plan)Gross profit at 39.9%10x gross profit10x revenue (plan)
I. Launch$6M$2.39M$23.9M$60M
II. Launchpad live$80M$31.9M$319M$800M
III. AI workers for everyone$1B$399M$3.99B$10B
IV. Global$12B$4.78B$47.8B$120B
V. The people's economyPEOPLE 85%$300B$120B$1.2T$3T
S02

14.2 The community meter

The home page and THE GUIDE carry a meter of the community. It counts real members, not dollars, and reads only the rule-based count of section 5 (meter() in the model):

  • Until the first count runs, it reads CHECKING.
  • Below 10,000 real members it shows the live count and the next step: 'Next: 10,000 members'.
  • From 10,000 it reads 'MILESTONE REACHED: 10,000 REAL MEMBERS', then 'Live now: real members' and 'Next: 25,000 members'. The milestone shown is the highest ever reached, and it stays when the live count dips.
  • A dollar figure appears only once OPEN BOOKS has 12 months of audited revenue: 10 times that revenue, with its date. For example, $1,200,000 of audited revenue to 31 Dec 2027 shows $12,000,000.
  • Other counters only ever rise: members ever verified, cash paid to members, jobs done and Q earned.

THE GUIDE's chapter 15 shows the plan's arithmetic for each member, labelled as the plan.

The milestones are 10,000, 25,000, 50,000, 100,000, 250,000 and 500,000 real members, then 1 million, 5 million, 10 million, 50 million, 100 million and 1 billion. Five of them do more than move the meter: - 100,000: the Founder's and the team's first 25% unlocks, once the count has held for 90 days and been audited, and stage 2 of the work pool begins. - 1,000,000: live launches can open; 50% unlocked; stage 3. - 10,000,000: 75% unlocked; stage 4. - 100,000,000: 100% unlocked; stage 5. - 1,000,000,000: one billion owners.


VAULT BAY 15 OF 17

15. What the model checks

Post-Quantum Merkle-Sum Ledger and Formal Python Invariant VaultEXPAND 2K
01

Exact rational arithmetic

Every supply balance, round gate, halving step and payout split uses Python fractions.Fraction with zero floating-point drift.

02

Zero-overdraw conservation

The ledger enforces 3,000,000,000 Q conservation across every pot, round, treasury vote and recycled reward account.

03

90-day sustained audit gates

Founder (5%) and Core Team (10%) unlocks require 90 consecutive audited days at or above each real-member milestone.

04

Production flag resilience

Every single check() invariant runs under both normal execution and python3 -O optimized mode so no assertion can ever be stripped.

tokenomics_public_model.py uses exact fractions and enforces 125 check() invariant checks across its 1,192 lines. Each rule below is verified in the code: if any check is false, or an input it needs is missing, the model stops with an error and writes nothing. All 125 invariant checks hold under python3 -O as well. Running python3 tokenomics_public_model.py prints "all invariants hold" and writes tokenomics_public.json.

The split

  1. The six shares (25%, 40%, 10%, 10%, 5%, 10%) add to exactly 100%.
  2. The people's four blocks (rounds, work, Builders, treasury) are 85% of the 3,000,000,000 Q.
  3. The payout caps are Founder 5% and the team 10%, the same as their shares of Q Nation.

The rounds

  1. Each round holds 45,000,000 Q, and the ten rounds raise exactly $122,760,000.
  2. The revenue gate is $12,800,000 for round 5 and $409,600,000 for round 10.
  3. Rounds 1 to 4 raise exactly $1,800,000.
  4. The gate gives the five results of section 4.2, leaves out revenue from flagged accounts, and never gates rounds 1 to 4.

The work pool

  1. The five stage shares (10%, 20%, 30%, 25%, 15%) add to 100%, and the Q of the five stages to exactly 1,200,000,000.
  2. The seven pot shares add to 100%.
  3. The invite pay matches the pot: 160 Q to the inviter + 80 Q to the newcomer = 240 Q = 20% of the 1,200 Q released per new member in stage 1.
  4. The example mix of 8 community leaders, 50 marketers, 200 teaching professionals and 2,000 students fits inside every stage 1 pot, brings no more members than stage 1 holds (85,000 of 100,000), and is paid in full.
  5. Over the whole stage 1 population, no pot is ever overdrawn. With 10% and with 50% of members working like the student, THE JOB BOARD pays 31.3% and 6.3% of the example (section 13).
  6. The release runs from 0 to 1,200,000,000 Q and has released 120,000,000 Q by 100,000 real members.
  7. Each day, no pot pays more than it holds or more than it has received; 180 days of steady joins pay a steady MINING day; and the day of 3,300 joins in section 5.5 pays less than a fifth of what the old rule paid.

The ledger

  1. The ledger always holds exactly 3,000,000,000 Q, and no account goes below zero.
  2. The pots never pay more than the release allows at the highest audited count, and the recycled account never pays out more than it took in.
  3. The dip of section 5.2 passes on the highest count, and fails on the current count.

Real members and the meter

  1. Paid checked work 10 days ago keeps a member real. Sign-ins, free play and holding alone do not. A buy 40 days ago has lapsed. Team accounts never count.
  2. An action on neither list, or a member record without its team flag, stops the model.
  3. The meter reads CHECKING until the first count, shows no milestone below 10,000, never goes back when the live count dips, shows no dollar figure before OPEN BOOKS, and shows 10 times audited revenue with its date once OPEN BOOKS runs. A dollar figure without its date stops the model.

Founder and team

  1. The four unlock steps add to 100%.

The phases

  1. Phase V's plan case values 1 Q at $1,000.

The 85/15 rule at a sale

  1. In the early case (460,000,000 of the people's Q issued, $3B, all team Q granted), the people receive exactly 85% and the people's dividend is exactly $2,090,000,000.
  2. With 0, 300,000,000, 1,000,000,000 or 2,550,000,000 of the people's Q issued, a $3B sale pays the people at least 85%.
  3. A sale with -1, 2,550,000,001, 2,900,000,000 or 5,000,000,000 of the people's Q issued stops the model.
  4. Every sale pays each Q once and the price in full, no more, and pays the people at least 85%, the Founder at most 5% and the team at most 10%. The model runs it with team grants at 0%, 50% and 100%.

Profit payouts

  1. Earlier losses are made back before anything is paid, and the reserve comes first (the three histories of section 11.2).
  2. At the first unlock with all team Q granted, a $500,000 payout pays the people $425,000, the Founder $25,000 and the team $50,000. Before the first unlock the people receive all of it. At full issuance the split is 85%, 5% and 10%.
  3. In every payout the people get at least 85%, the Founder at most 5% and the team at most 10%, and a people's Q is never paid less than one of the Founder's or the team's.

Prices, THE Q WINDOW and Q back

  1. The reference price is the lower of the last round's price and 10 times audited revenue over 3,000,000,000. With no round open and no reference price, asking for a Q price stops the model.
  2. The Window stays closed in a quarter without profit, refuses a share above half of the profit not paid out and a price above the reference price, never fills an account above its cap and never spends more than its budget.
  3. Card Q back stops the model while there is no interchange figure, is paid only from interchange, and pays nothing before the identity check.
  4. The shop's 5% back on $49 with round 1 open is 918.75 Q.

Margins

  1. Q Nation keeps money on every Work Exchange job of section 8.3, and a commission on the full job price would lose money on every such job.
  2. No Creator Studio cell loses money beyond the two the approved plans show, GO VIRAL and GO VIRAL PLUS keep money direct and Builder-sold, and every costed revenue line keeps money. A revenue line without its inputs stops the model.

The people's dividend

  1. The dividend is paid in full and no more, nobody receives more than 5 times the median, and real members with no checked work, scripted accounts and accounts without the identity check receive $0.

The cash plan

  1. In each case cash never goes below zero, costs stay inside the monthly cap, and no round sells more than its 45,000,000 Q.

The plan arithmetic for THE GUIDE

  1. The plan value per member that THE GUIDE's chapter 15 shows rises at every milestone from 10,000 to 1,000,000,000 real members, gives $60,000,000 at 100,000 members, and 1 Q = $1,000 at 1,000,000,000.

Public ecosystem, Launchpad fee and on-chain $QUIT supply sink checks (version 5)

  1. The Launchpad's 1.50% swap fee splits into 0.60% creator, 0.30% + 0.10% + 0.05% across three invite levels (1.05% total to creator and inviters), 0.21% to the Treasury and 0.24% to Meteora, summing to exactly 1.50% (MP-D123, MP-D134).
  2. The two-sided verified invite reward (160 Q inviter + 80 Q newcomer = 240 Q, MP-D55) uses 7,200,000 Q across 30,000 verified Stage 1 invites, fitting inside Stage 1's 24,000,000 Q Invites & Creators pot (30% utilization).
  3. Verifiable permanently burned $QUIT (62,099,349) plus live $QUIT supply (937,900,651) equals the exact 1,000,000,000 launch supply on Solana (HSHJ3t4Vu3B1qMs9Nv5iKUaoPMQQf1VuT5vVaTvLqc6p).
  4. 105,948,500 $QUIT (11.30% of live supply) is locked on-chain across 12 Jupiter Lock vaults (LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn) until October 2027.

The ledger's own checks. The Q ledger is double entry and append only. Once live, it checks these on every write where cheap and in full every day: no negative balance; a public round sells at most 45,000,000 Q and rounds open in order; pots release no more than the release function allows at the highest audited count; recycled Q paid out never exceeds recycled Q received; Q minted on chain equals the Q recorded as claimed; USDC received in the treasury equals the settled buys; nothing sits in WAITING past 7 days without a CHECKS case.


VAULT BAY 16 OF 17

16. Five revenue engines, organic flywheel and verifiable $QUIT supply sinks

S01

16.1 Organic community flywheel & 240 Q verified invite math

Q Nation four-pillar community flywheel and 240 Q verified invite protocolEXPAND 2K

Stage 1 (0 to 100,000 real verified members) releases 120,000,000 Q (1,200 Q per new real member) across seven daily halving pots. Because 20% (24,000,000 Q) sits in the Invites & Creators pot, 30,000 verified member invites at 240 Q (160 Q inviter paid over 90 active days + 80 Q newcomer) require 7,200,000 Q (30.0% of the pot), leaving 16,800,000 Q for verified creator onboarding bounties (2,500 Q) and daily community campaigns without ever overdrawing a single Q.

S02

16.2 Five revenue engines & 39.9% blended contribution margin

Five real revenue engines, 39.9% blended contribution margin and >= 50% profit payout floorEXPAND 2K
COSTED REVENUE LINE SPECIFICATION · 3 ROWSCONSTITUTIONAL INVARIANT · VERIFIED
Costed revenue lineGross benchmarkDirect & Builder fees deductedVerified net contribution
AI Work Exchange ($150 job, 20% Q Nation cut = $30)$30.00 kept$5.55 card fee, $5.00 AI compute, $1.50 dispute reserve, $0 to $13.50 D04 Builder pay40.1% blended margin on kept cut ($17.95 direct; $4.45 to $8.41 Builder-brought)
AI Creator Studio (Starter to Agency SaaS)Monthly plan cashProduction AI compute, card processing, half-Q discount & Builder commissions39.7% blended cash margin (50/50 mix yields 39.9% blended)
Launchpad Swap Fee (Phase II, 1,000,000 members)1.50% swap fee0.60% creator + 0.45% 3-level invites + 0.24% Meteora0.21% net to Q Nation Treasury (70% of fee goes to creators & inviters)
S03

16.3 Verifiable on-chain $QUIT supply sinks & Sovereign AI Desk priority waves

Sovereign AI Desk non-custodial execution waves and verifiable $QUIT priority tiersEXPAND 2K
ON-CHAIN SUPPLY & ESCROW VERIFICATION · 5 RECORDSCONSTITUTIONAL INVARIANT · VERIFIED
On-chain $QUIT metric or utility gateVerified quantity / parameterRole in the dual-coin Q Nation architecture
Launch Supply (Solana SPL)1,000,000,000 $QUITFixed genesis mint (HSHJ3t4Vu3B1qMs9Nv5iKUaoPMQQf1VuT5vVaTvLqc6p)
Permanently Burned62,099,349 $QUIT (6.21%)Removed permanently on-chain, leaving 937,900,651 $QUIT live supply
1-Year Jupiter Lock (12 PDAs)105,948,500 $QUIT (11.30% of live)Verifiable on-chain in Jupiter Lock (LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn) to October 2027
Hold-to-Mine Q Weight1x to 10x daily weightUp to 5x age step (365+ days) times 2x never-sold multiplier on the 240,000,000 Q Holding Pot
Sovereign AI Desk Priority Waves50K / 250K / 1M+ $QUITNon-custodial passkey execution (75% / 80% / 85% profit kept by member; desk share buys back & burns $QUIT)

VAULT BAY 17 OF 17

Appendix A. The model code

tokenomics_public_model.py, verbatim (1,192 lines, 125 checked constitutional invariants). It writes tokenomics_public.json, which every public Q Nation paper and interactive hardware simulator reads.

Executable Specification
1,193 LINES
Character-for-character verified Python model
Machine-Checked Rules
125 CHECKS
Every sum, round, lock & margin invariant passes
Constitutional Supply
3,000,000,000 Q
85% People / 5% the Founder Cap / 10% Team Cap
External Dependencies
ZERO
Pure standard-library Python reproducible anywhere
VERBATIM CONSTITUTIONAL INVARIANT · VERIFIED (1,193 LINES : CHARACTER-FOR-CHARACTER VERIFIED)CLICK TO EXPAND
SINGLE SOURCE OF TRUTH : 125 INVARIANT CHECKS
#!/usr/bin/env python3
"""Q Nation Public Constitutional Tokenomics Model (v5, 12 Nov 2026):
Every constitutional figure in the public White Paper and Tokenomics Report is computed here and checked.
Any broken invariant throws immediately. Verifies the 3,000,000,000 Q fixed supply, the 85/15 rule,
the 10 public rounds (R1 $8M to R10 $4.096B) + 300,000,000 Q Strategic Founding Reserve inside the 25% Rounds Vault,
the V/10 two-quarter audited revenue gates, the 5 work-pool stages, the 7 daily halving pots,
the 39.9% blended contribution margin, and the 36-month D22 monthly cost cap."""
import json
from fractions import Fraction as F
from pathlib import Path

ROOT = Path(__file__).resolve().parent


class MissingInput(KeyError):
    """A figure the model needs is absent. It is never guessed and never read as zero."""


def need(value, name):
    if value is None:
        raise MissingInput(f'missing input: {name}')
    return value


def req(record, keys, where):
    if not isinstance(record, dict):
        raise MissingInput(f'{where}: expected a record, got {type(record).__name__}')
    for k in keys:
        if k not in record or record[k] is None:
            raise MissingInput(f'{where}: missing {k}')
    return [record[k] for k in keys]


def check(cond, msg):
    """An invariant that still throws under python -O."""
    if not cond:
        raise AssertionError(msg)

N = 3_000_000_000                       # Q = 100% of QUIT
SPLIT = {                                # MP-D5, 8 Nov 2026
    'rounds': F(25, 100), 'work': F(40, 100), 'builders': F(10, 100),
    'treasury': F(10, 100), 'founder': F(5, 100), 'team': F(10, 100)}  # MP-D46, 9 Nov: Founder 5%, team 10%
check(sum(SPLIT.values()) == 1, 'the six shares add to 100%')
ALLOC = {k: int(N * v) for k, v in SPLIT.items()}
PEOPLE = ALLOC['rounds'] + ALLOC['work'] + ALLOC['builders'] + ALLOC['treasury']
check(PEOPLE * 100 // N == 85, "the people's four blocks are 85%")

# Inside the 750,000,000 Q (25%) Rounds Vault: 300,000,000 Q Strategic Founding Reserve + 450,000,000 Q across 10 Public Rounds
FOUNDING_RESERVE_Q = 300_000_000
check(0 < FOUNDING_RESERVE_Q < ALLOC['rounds'], "the Strategic Founding Reserve sits inside the rounds' 25%")
# The people's public rounds: ten rounds of 45,000,000 Q following the 300,000,000 Q Strategic Founding Reserve, valuation doubling from $8M
ROUNDS = 10
PER_ROUND = (ALLOC['rounds'] - FOUNDING_RESERVE_Q) // ROUNDS
VALS = [8_000_000 * 2 ** i for i in range(ROUNDS)]
rounds = []
raised = 0
for i, v in enumerate(VALS, 1):
    price = F(v, N)
    raise_ = PER_ROUND * price
    raised += raise_
    rounds.append(dict(round=i, valuation=v, price=float(price), q_per_100=int(100 / price),
                       worth_if_sold_3b=int(100 / price), multiple_at_3b=float(F(3_000_000_000, v)),
                       round_raises=float(raise_), raised_so_far=float(raised)))
check(PER_ROUND == 45_000_000 and FOUNDING_RESERVE_Q + ROUNDS * PER_ROUND == ALLOC['rounds'],
      'the 300,000,000 Q Strategic Founding Reserve and ten public rounds of 45,000,000 Q fill the 750,000,000 Q Rounds Vault')
check(round(float(raised)) == 122_760_000, 'ten public rounds of 45,000,000 Q raise $122,760,000')
RAISE_MIN = float(raised) / 1.07       # every buy referred, 7% of Q goes to three referral levels

# Work and community: released as real members grow (stage, members at end of stage, share of the 1.2B)
STAGES = [(1, 100_000, F(10, 100)), (2, 1_000_000, F(20, 100)), (3, 10_000_000, F(30, 100)),
          (4, 100_000_000, F(25, 100)), (5, 1_000_000_000, F(15, 100))]
check(sum(s for _, _, s in STAGES) == 1, 'the five stage shares add to 100%')
stages, prev = [], 0
for n, upto, share in STAGES:
    q = int(ALLOC['work'] * share)
    stages.append(dict(stage=n, members_from=prev, members_to=upto, q=q,
                       q_per_new_member=float(F(q, upto - prev))))
    prev = upto
check(sum(s['q'] for s in stages) == ALLOC['work'], 'the five stages add to 1,200,000,000 Q')
POTS = {'job_board': F(30, 100), 'invites_and_creators': F(20, 100), 'holding_quit': F(20, 100),
        'games': F(10, 100), 'academy': F(10, 100), 'departments_and_cups': F(5, 100), 'reserve': F(5, 100)}
check(sum(POTS.values()) == 1, 'the seven pot shares add to 100%')

# Founder and team unlock with real members (MP-D6); all at a sale
UNLOCK = [(100_000, F(1, 4)), (1_000_000, F(1, 4)), (10_000_000, F(1, 4)), (100_000_000, F(1, 4))]
check(sum(s for _, s in UNLOCK) == 1, 'the four unlock steps add to 100%')

# What Q is worth at any QUIT value: value / N. The phase scenarios are assumptions, stated as such.
def q_value(valuation):
    return valuation / N
PHASES = [  # name, real members, revenue per member per year (assumption), revenue multiple (assumption)
    ('I. Launch', 100_000, 60, 10), ('II. Launchpad live', 1_000_000, 80, 10),
    ('III. AI workers for everyone', 10_000_000, 100, 10), ('IV. Global', 100_000_000, 120, 10),
    ('V. The people\'s economy', 1_000_000_000, 300, 10)]
phases = []
for name, m, arpu, mult in PHASES:
    rev = m * arpu; val = rev * mult
    phases.append(dict(phase=name, members=m, revenue_per_member=arpu, revenue=rev, multiple=mult,
                       valuation=val, q_value=q_value(val), q_for_1m=1_000_000 / q_value(val)))
check(abs(phases[-1]['valuation'] - 3e12) < 1 and abs(phases[-1]['q_value'] - 1000) < 1e-9, 'phase V: 1 Q = $1,000')

# Paths: Q earned by work in stage 1, at example rates set from the stage 1 pots (the live rates are set daily by each pot)
STAGE1_PER_MEMBER = stages[0]['q_per_new_member']                  # 1,200 Q per new real member in stage 1
INVITE_PER_MEMBER = STAGE1_PER_MEMBER * float(POTS['invites_and_creators'])   # 240 Q: 160 to the inviter, 80 to the newcomer
RATES = {'task': 50, 'raid_action': 10, 'event_hosted': 5_000, 'active_member_brought': 160,
         'creator_brought': 2_500, 'course_taught': 25_000, 'course_finished': 100}
NEWCOMER = 80
check(RATES['active_member_brought'] + NEWCOMER == INVITE_PER_MEMBER, 'invite pay: 160 + 80 = 240 Q')
POT_OF = {'task': 'job_board', 'raid_action': 'job_board', 'event_hosted': 'job_board',
          'active_member_brought': 'invites_and_creators', 'creator_brought': 'invites_and_creators',
          'course_taught': 'academy', 'course_finished': 'academy'}
PATHS = {
  'Network leader': {'active_member_brought': 5_000, 'event_hosted': 12, 'task': 100},
  'Marketer or blogger': {'creator_brought': 20, 'active_member_brought': 500, 'task': 200},
  'Illustrator who teaches': {'course_taught': 1, 'event_hosted': 4, 'task': 150, 'raid_action': 600, 'course_finished': 4},
  'Student or new starter': {'task': 150, 'raid_action': 400, 'active_member_brought': 10, 'course_finished': 6},
}
MIX = {'Network leader': 8, 'Marketer or blogger': 50, 'Illustrator who teaches': 200, 'Student or new starter': 2_000}
paths = []
for who, acts in PATHS.items():
    q = sum(RATES[a] * n for a, n in acts.items())
    paths.append(dict(who=who, actions=acts, q=q, at_300m=q * q_value(3e8), at_3b=q * q_value(3e9),
                      at_30b=q * q_value(3e10), at_3t=q * q_value(3e12)))
# Example-mix check (D08 renames the papers' "It all fits."): this one hand-picked mix of 2,258 earners (2.26% of stage 1's
# 100,000 real members) fits inside every stage 1 pot at the example rates and brings no more members than the stage
# holds. It does not test the whole stage population; population_check() further down does.
stage1 = stages[0]['q']
spend = {p: 0 for p in POTS}
brought = 0
for who, acts in PATHS.items():
    for a, n in acts.items():
        spend[POT_OF[a]] += RATES[a] * n * MIX[who]
        if a == 'active_member_brought':
            spend['invites_and_creators'] += NEWCOMER * n * MIX[who]
            brought += n * MIX[who]
for pot, used in spend.items():
    check(used <= stage1 * POTS[pot], (pot, used, stage1 * POTS[pot]))
check(brought <= stages[0]['members_to'], brought)
mix_need = sum(spend.values())


# Proof-gated rounds (MP-D14, kept by MP-D130): public round N >= 5 opens at a yearly revenue run rate of one tenth of
# its valuation
for r in rounds:
    r['revenue_gate'] = None if r['round'] <= 4 else r['valuation'] / 10
check(rounds[4]['revenue_gate'] == 12_800_000 and rounds[9]['revenue_gate'] == 409_600_000,
      'gates: round 5 $12.8M, round 10 $409.6M')
OPEN_NOW_RAISE = sum(r['round_raises'] for r in rounds[:4])
check(round(OPEN_NOW_RAISE) == 1_800_000, 'public rounds 1 to 4 raise $1,800,000')

# The 85/15 rule (MP-D13, split changed by MP-D46): at any sale, Founder <= 5%, team <= 10%, every issued Q paid the same, the people's
# unissued value paid to real members as a people's dividend. Check the review's early-sale scenario.
# T4 (audit A19, A10): the shares are now computed from the Q each holder is paid, every one of the 3,000,000,000 Q
# exactly once at the same price, so the check can fail. the Founder is paid on his 150,000,000 Q (all unlock at a sale, MP-D6).
# The team is paid only on team Q granted to a named person and vested on the record date (D15); ungranted or unvested
# team Q joins the people's dividend. People's Q issued must lie between 0 and 2,550,000,000 and the dividend can never
# be negative. Every input is required.
def sale(price, issued_people_q, *, team_q_vested):
    need(price, 'sale price'); need(issued_people_q, "people's Q issued"); need(team_q_vested, 'team Q granted and vested')
    check(price > 0, f'sale price must be above 0: {price}')
    check(0 <= issued_people_q <= PEOPLE, f"people's Q issued must lie between 0 and {PEOPLE:,}: {issued_people_q:,}")
    check(0 <= team_q_vested <= ALLOC['team'], f"team Q granted and vested must lie between 0 and {ALLOC['team']:,}")
    per_q = price / N
    q_paid = dict(founder=ALLOC['founder'], team=team_q_vested, people_q=issued_people_q,
                  dividend=PEOPLE - issued_people_q + ALLOC['team'] - team_q_vested)
    check(sum(q_paid.values()) == N, 'every Q is paid exactly once at a sale')
    usd = {k: q * per_q for k, q in q_paid.items()}
    check(usd['dividend'] >= 0, f"the people's dividend can never be negative: {usd['dividend']:,.0f}")
    people_share = (usd['people_q'] + usd['dividend']) / price
    founder_share, team_share = usd['founder'] / price, usd['team'] / price
    check(people_share >= 0.85 - 1e-12, f'the people get at least 85% at a sale: {people_share:.6f}')
    check(founder_share <= 0.05 + 1e-12, f'the Founder gets at most 5% at a sale: {founder_share:.6f}')
    check(team_share <= 0.10 + 1e-12, f'the team gets at most 10% at a sale: {team_share:.6f}')
    check(abs(sum(usd.values()) - price) <= 1e-9 * price, 'the sale price is paid out in full, no more')
    return dict(founder=usd['founder'], team=usd['team'], people_q=usd['people_q'], dividend=usd['dividend'],
                people_share=people_share, founder_share=founder_share, team_share=team_share, dividend_q=q_paid['dividend'],
                team_q_vested=team_q_vested)
early = sale(3e9, 460_000_000, team_q_vested=ALLOC['team'])     # the review's case: all team Q granted and vested
check(abs(early['people_share'] - 0.85) < 1e-9 and round(early['dividend']) == 2_090_000_000, 'the early sale: 85%, $2,090,000,000')
for issued in (0, 300_000_000, 1_000_000_000, 2_550_000_000):
    check(sale(3e9, issued, team_q_vested=ALLOC['team'])['people_share'] >= 0.85 - 1e-9, issued)
for bad in (-1, PEOPLE + 1, 2_900_000_000, 5_000_000_000):      # A19: these used to pass with a negative dividend
    try:
        sale(3e9, bad, team_q_vested=ALLOC['team'])
    except AssertionError:
        pass
    else:
        raise AssertionError(f"sale() accepted {bad:,} people's Q issued")

# Community milestones and the community value model (8 Nov 2026). Value per real member = revenue per member
# per year x 10, using the phase assumptions above until Open Books reports measured revenue per member.
def per_member_value(members):
    for name, upto, arpu, mult in PHASES:
        if members <= upto:
            return arpu * mult
    return PHASES[-1][2] * PHASES[-1][3]
UNLOCKS = {100_000: "Founder and team 25% unlock; work pool stage 2", 1_000_000: "Live launches open; Founder and team 50%; stage 3",
           10_000_000: "Founder and team 75%; stage 4", 100_000_000: "Founder and team 100%; stage 5",
           1_000_000_000: "One billion owners"}
MILESTONES = [10_000, 25_000, 50_000, 100_000, 250_000, 500_000, 1_000_000, 5_000_000, 10_000_000, 50_000_000,
              100_000_000, 1_000_000_000]
milestones = []
for m in MILESTONES:
    v = m * per_member_value(m)
    milestones.append(dict(members=m, value_per_member=per_member_value(m), community_value=v, q_value=v / N,
                           alex_12400_q=12_400 * v / N, unlock=UNLOCKS.get(m, '')))
vals = [x['community_value'] for x in milestones]
check(all(b > a for a, b in zip(vals, vals[1:])), 'the model value must rise at every milestone')
check(milestones[3]['community_value'] == 60_000_000 and milestones[-1]['q_value'] == 1000, 'milestones: $60M at 100,000; $1,000 a Q at 1B')


# ======================================================================================================================
# v3, 9 Nov 2026 (UTC): the economics audit fixes approved in MP-D56. ECONOMICS-AUDIT.md items in brackets.
# Inputs first. PLAN_INPUTS are the Founder's decisions; ASSUMPTIONS are figures the plan does not set, each with its basis.
# ======================================================================================================================
PLAN_INPUTS = {
    'founder_cap': (F(5, 100), 'MP-D46: the Founder gets at most 5% of any payout or sale'),
    'team_cap': (F(10, 100), 'MP-D46: the team gets at most 10%'),
    'payout_share_floor': (F(1, 2), 'MP-D9, kept by D23: at least 50% of distributable profit'),
    'payout_reserve_months': (6, 'D23: 6 months of operating costs kept in reserve before a payout'),
    'window_max_share_of_unpaid_profit': (F(1, 2), 'D25: at most half of the profit not paid out goes to the Window'),
    'window_account_cap_share': (F(2, 100), "D25: the per-account cap, 'for example 2% of the quarter's cap'"),
    'window_bought_months': (12, 'D25: bought Q can be offered after 12 months'),
    'window_earned_ready_months': (6, 'D25: earned Q can be offered after 6 months READY'),
    'window_open_business_days': (20, 'D25: the Window stays open 20 business days'),
    'reference_multiple': (10, 'D24: 10 times audited revenue over the last 12 months, divided by 3,000,000,000'),
    'even_release_days': (180, 'D18: each release into the MINING and games pots pays out evenly over 180 days'),
    'even_release_pots': (('holding_quit', 'games'), 'D18: the MINING (holding) and games pots'),
    'dividend_cap_x_median': (5, "D13: at most 5 times the median per person"),
    'meter_multiple': (10, 'D05: the dollar figure is 10 times audited revenue over the last 12 months'),
    'gate_quarters': (2, 'D26: the last two audited quarters, both above the gate'),
    'real_member_days': (30, 'WHITE-PAPER 4.1: a real action in the last 30 days'),
    'shop_cash_back_rate': (F(5, 100), 'TOKENOMICS-REPORT 12.1: 5% of every card payment in THE SHOP back in Q'),
    'wx_job_price': (150, 'MP-D33: the example job'),
    'wx_cut': (F(20, 100), 'MP-D33: QUIT keeps 20%'),
    'builder_rate_first_month': (F(40, 100), "WHITE-PAPER 4.2: 40% of the first month"),
    'builder_rate_after': (F(25, 100), 'WHITE-PAPER 4.2: 25% of every payment after that'),
    'builder_team_levels': (F(14, 100), 'WHITE-PAPER 4.2: 5, 3, 2, 1, 1, 1 and 1% over seven team levels'),
    'builder_cap': (F(45, 100), "D04: inside the Builders' 45% cap on field pay"),
    'stage1_target_members': (100_000, 'Stage 1 real verified members target by Dec 2027 (plan pace Q4)'),
    'q1_checkpoint_members': (10_000, 'Q1 Mar 2027 90-day checkpoint on the way to Stage 1 100,000 real members'),
    'launchpad_swap_fee': (
        dict(creator=F(60, 10000), inviter=F(30, 10000), level_2=F(10, 10000), level_3=F(5, 10000),
             quit_treasury=F(21, 10000), meteora=F(24, 10000)),
        'MP-D123 and MP-D134: 1.50% total launchpad swap fee on trades placed through QUIT'),
}
ASSUMPTIONS = {
    'card_fee_rate': (F(35, 1000), "card fee on a Work Exchange job; the higher of the audit's two figures "
                                   "(v6/audit/flow_checks.py; stress_model.py uses 2.9%)"),
    'card_fee_fixed': (F(30, 100), 'card fee per payment, both audit scripts'),
    'wx_ai_cost_per_job': (5, 'AI work on a $150 job (WHITE-PAPER 3.5, as stress_model.py reads it)'),
    'chargeback_reserve_rate': (F(1, 100), 'card disputes run for up to about 120 days (stress_model.py)'),
    'wx_builder_share': (F(1, 2), 'share of Work Exchange jobs from Builder-brought businesses'),
    'wx_first_month_share': (F(1, 12), "share of a Builder-brought business's jobs in its first month (a 12-month stay)"),
    'cs_plan_mix': ({'STARTER': F(60, 100), 'WEEKLY': F(30, 100), 'DAILY': F(8, 100), 'AGENCY': F(2, 100)},
                    'Creator Studio plan mix (stress_model.py)'),
    'cs_builder_sold_share': (F(1, 2), 'share of Creator Studio plans sold by Builders (stress_model.py)'),
    'cs_half_q_share': (F(1, 4), 'share of Creator Studio plans paid half with Q (stress_model.py)'),
    'revenue_mix': ({'creator_studio': F(1, 2), 'work_exchange': F(1, 2)},
                    'the two revenue lines with costed inputs; THE ACADEMY and data licences have none yet'),
    'fixed_cost_month': (200_000, 'planned fixed costs, the lean $2.4M a year (stress_model.py)'),
    'variable_cost_member_year': (2, 'hosting, help chat, CHECKS reviews, per real member (stress_model.py)'),
    'cost_cap_runway_months': (12, "D22's hard monthly cost cap: a month's costs at most 1/12 of cash on hand plus "
                                   "that month's contribution, so cash always covers 12 months at the current spend"),
    'refund_rate': (F(2, 100), 'revenue refunded'),
    'flagged_revenue_rate': (F(0), 'revenue from accounts CHECKS flags (left out of the D26 gate)'),
    'audit_lag_quarters': (1, 'an audited quarter lands one quarter after it ends'),
    'cash_plan_start': ((2027, 1), 'the first month after the issuer is named by 31 Dec 2026 (MP-D32); the rounds '
                                   "sell only once MP-D54's gates are met"),
    'cash_plan_months': (36, 'three years'),
    'member_paths': ({'plan pace': [10_000, 25_000, 50_000, 100_000, 150_000, 225_000, 340_000, 500_000, 650_000,
                                    800_000, 900_000, 1_000_000],
                      'slow growth': [4_000, 6_000, 9_000, 12_000, 15_000, 18_000, 21_000, 24_000, 27_000, 30_000,
                                      33_000, 36_000]},
                     'real members at each quarter end (stress_model.py)'),
    'cash_cases': ({'low': dict(path='slow growth', revenue_per_member=30, rounds_1_4_months=30),
                    'base': dict(path='plan pace', revenue_per_member=30, rounds_1_4_months=18),
                    'high': dict(path='plan pace', revenue_per_member=60, rounds_1_4_months=9)},
                   'revenue per real member a year at half the plan ($30) and at the plan ($60), as D27 asks; '
                   'rounds 1 to 4 sell evenly over the months shown'),
    'gated_round_months': (6, 'an open gated round sells its 45,000,000 Q evenly over 6 months'),
    'starting_operating_reserve_usd': (400_000, 'initial operating cash reserve at cash-plan start (Jan 2027) under the D22 1/12 monthly cap'),
    'cash_plan_window_share': (F(1, 2), 'the Window takes the most D25 allows, the hardest case for cash'),
    'growth_forecast_per_day': (300, 'new real members a day (the audit A14 example)'),
    'expected_actions_per_day': (1_000, 'paid actions a day on THE JOB BOARD (the audit A14 example)'),
    'pot_scenario_days': (300, 'days in the pot scenario, all inside stage 1'),
    'pot_scenario_viral_day': (240, 'the day 3,000 extra real members join at once (the audit A14 example)'),
    'pot_scenario_viral_extra': (3_000, 'the audit A14 example'),
    'mining_example_quit': (1_250_000, 'the example member Alex holds 1,250,000 $QUIT (OFFICE-V6, KIT-V6)'),
    'mining_example_multiplier': (2, 'Alex at 94 days held, the 2x step (D28)'),
    'mining_example_q_today': (180, "the frames' example day: '+180 Q MINED TODAY' (OFFICE-V6 6.7, proposed) and "
                                    "'+180 Q TODAY FROM HOLDING' (MM01, QU02)"),
    'participation_spreads': ({'the example mix': 'MIX',
                               '10% work like the student': {'Student or new starter': 10_000},
                               '50% work like the student': {'Student or new starter': 50_000},
                               '10%, in the example proportions': 10_000,
                               '25%, in the example proportions': 25_000},
                              'who works in stage 1 (100,000 real members); the rest earn only the 80 Q newcomer Q'),
    'dividend_example_population': ([
        dict(group='real members, light checked work', count=60_000, id_checked=True, real_on_record_date=True,
             checked_work_q_days=500 * 60),
        dict(group='real members, regular checked work', count=20_000, id_checked=True, real_on_record_date=True,
             checked_work_q_days=5_000 * 120),
        dict(group='real members, heavy checked work', count=5_000, id_checked=True, real_on_record_date=True,
             checked_work_q_days=50_000 * 200),
        dict(group='network leaders', count=50, id_checked=True, real_on_record_date=True,
             checked_work_q_days=865_000 * 300),
        dict(group='real members with no checked work', count=15_000, id_checked=True, real_on_record_date=True,
             checked_work_q_days=0),
        dict(group='scripted accounts active 330 days, no checked work', count=50_000, id_checked=False,
             real_on_record_date=True, checked_work_q_days=0),
        dict(group='checked work, no identity check', count=2_000, id_checked=False, real_on_record_date=True,
             checked_work_q_days=5_000 * 120)],
        'an illustrative record date at 100,000 real members; Q earned through checked work x days held'),
    'dividend_example_sale_price': (60_000_000, "the plan's own value at 100,000 real members (audit A04)"),
    'window_example': (dict(audited_revenue_12m=2_000_000, last_round=4, distributable=500_000, window_share=F(1, 2),
                            offers=[dict(who='bought Q, held 14 months', q=100_000, kind='bought', months=14,
                                         id_checked=True, count=1_000),
                                    dict(who='earned Q, 7 months READY', q=5_000, kind='earned', months=7,
                                         id_checked=True, count=2_000),
                                    dict(who='one large holder, held 13 months', q=5_000_000, kind='bought', months=13,
                                         id_checked=True, count=1),
                                    dict(who='bought Q, held 6 months', q=20_000, kind='bought', months=6,
                                         id_checked=True, count=500),
                                    dict(who='earned Q, no identity check', q=10_000, kind='earned', months=9,
                                         id_checked=False, count=300)]),
                       'an illustrative quarter; none of these figures is a forecast'),
    'card_function_test': (dict(spend={'groceries': 400, 'fuel': 150, 'cash_like': 300}, interchange_rate=F(1, 100),
                                q_back_rate=F(1, 200), cap_usd_month=10),
                           'a test of the function only; D20 sets no rate until the card provider is chosen'),
    'quit_onchain_sinks': (
        dict(burned_quit=62_099_349, locked_quit=105_948_500, live_supply_quit=937_900_651),
        'Verifiable Solana on-chain $QUIT supply: 62.10M burned + 937.90M live = 1B launch supply; 105.95M locked in 12 Jupiter PDAs to Oct 2027'),
}


def P(name):
    if name not in PLAN_INPUTS:
        raise MissingInput(f'missing plan input: {name}')
    return PLAN_INPUTS[name][0]


def A(name):
    if name not in ASSUMPTIONS:
        raise MissingInput(f'missing assumption: {name}')
    return ASSUMPTIONS[name][0]


check(P('founder_cap') == SPLIT['founder'] and P('team_cap') == SPLIT['team'], 'payout caps follow the MP-D46 split')
PRICE = {r['round']: F(r['valuation'], N) for r in rounds}       # exact round prices


# ---- D26: the revenue gate reads the last two audited quarters (A16) ----------------------------------------------
def gate_states(round_no, audited_quarters):
    """State of a round after each audited quarter: OPEN, CLOSED (never opened) or PAUSED (opened, then fell below).
    Rounds 1 to 4 have no gate (MP-D14). A gated round opens when the last two audited quarters both run at or above
    its gate, net of refunds and leaving out revenue from accounts CHECKS flagged, and pauses when they do not."""
    gate = rounds[round_no - 1]['revenue_gate']
    if gate is None:
        return ['OPEN'] * len(audited_quarters)
    k, runs, states, opened = P('gate_quarters'), [], [], False
    for i, q in enumerate(audited_quarters):
        rev, refunds, flagged = req(q, ('revenue', 'refunds', 'flagged_revenue'), f'audited quarter {i + 1}')
        check(rev >= 0 and refunds >= 0 and flagged >= 0 and refunds + flagged <= rev, f'audited quarter {i + 1}')
        runs.append((rev - refunds - flagged) * 4)
        above = len(runs) >= k and all(x >= gate for x in runs[-k:])
        states.append('OPEN' if above else ('PAUSED' if opened else 'CLOSED'))
        opened = opened or above
    return states


def _qtr(run_rate, refunds=0, flagged=0):
    return dict(revenue=F(run_rate, 4) + refunds + flagged, refunds=refunds, flagged_revenue=flagged)


M = 1_600_000                    # round 5's gate / 8 (MP-D130): every test rate keeps its ratio to the gate
check(M * 8 == rounds[4]['revenue_gate'], 'the gate tests are set from round 5 gate')
gate_cases = {
    'one strong quarter': ([9 * M], ['CLOSED']),
    'two quarters above': ([9 * M, 9 * M], ['CLOSED', 'OPEN']),
    'then one below': ([9 * M, 9 * M, 7 * M], ['CLOSED', 'OPEN', 'PAUSED']),
    'one back above': ([9 * M, 9 * M, 7 * M, 9 * M], ['CLOSED', 'OPEN', 'PAUSED', 'PAUSED']),
    'two back above': ([9 * M, 9 * M, 7 * M, 9 * M, 9 * M], ['CLOSED', 'OPEN', 'PAUSED', 'PAUSED', 'OPEN']),
}
round_gate_cases = {}
for name, (runs, want) in gate_cases.items():
    got = gate_states(5, [_qtr(x) for x in runs])
    check(got == want, f'D26 gate, {name}: {got}')
    round_gate_cases[name] = dict(round=5, gate=rounds[4]['revenue_gate'], yearly_run_rates=runs, states=got,
                                  old_rule_state='OPEN' if any(x >= rounds[4]['revenue_gate'] for x in runs) else 'CLOSED')
flag_case = gate_states(5, [_qtr(8 * M, flagged=M // 10), _qtr(8 * M, flagged=M // 10)])
check(flag_case == ['CLOSED', 'OPEN'], 'flagged revenue is left out before the gate is read')
flag_case = gate_states(5, [_qtr(76 * M // 10, flagged=M // 10), _qtr(76 * M // 10, flagged=M // 10)])
check(flag_case == ['CLOSED', 'CLOSED'], 'revenue from flagged accounts never opens a round')
check(gate_states(2, [_qtr(0)]) == ['OPEN'], 'rounds 1 to 4 have no gate (MP-D14)')


# ---- T5: the work pool releases on the highest audited count ever reached; recycled Q has its own account (A09) ----
def released(m):
    """Work-pool Q released at m real members: each stage releases its Q evenly across its member range."""
    need(m, 'member count')
    check(m >= 0, f'member count below zero: {m}')
    total = F(0)
    for s in stages:
        lo, hi = s['members_from'], s['members_to']
        total += s['q'] * min(F(1), max(F(0), F(m - lo, hi - lo)))
    return total


check(released(0) == 0 and released(1_000_000_000) == ALLOC['work'], 'the release runs from 0 to 1,200,000,000 Q')
check(released(100_000) == stages[0]['q'], 'stage 1 releases 120,000,000 Q by 100,000 real members')


def stage_index(m):
    for i, s in enumerate(stages):
        if s['members_from'] <= m < s['members_to']:
            return i
    return len(stages) - 1


class QLedger:
    """One ledger over all 3,000,000,000 Q (T5). The work pool releases into the seven pots on the highest audited
    real-member count ever reached, so a dip releases nothing and takes nothing back. Q spent in THE SHOP and Q bought
    back by THE QUIT WINDOW go to their own account, 'recycled', and are paid out again from it, outside the release
    check. Every move is checked."""

    def __init__(self):
        self.bal = {'rounds_unsold': F(ALLOC['rounds']), 'work_unreleased': F(ALLOC['work']), 'recycled': F(0),
                    'members': F(0), 'builders': F(ALLOC['builders']), 'treasury': F(ALLOC['treasury']),
                    'founder': F(ALLOC['founder']), 'team': F(ALLOC['team'])}
        self.bal.update({f'pot:{p}': F(0) for p in POTS})
        self.best, self.paid_from_release, self.recycled_in, self.recycled_out = 0, F(0), F(0), F(0)

    def _move(self, a, b, q):
        check(q >= 0, f'a move is never negative: {q}')
        check(self.bal[a] >= q, f'{a} holds {float(self.bal[a]):,.0f} Q and cannot pay {float(q):,.0f} Q')
        self.bal[a] -= q
        self.bal[b] += q

    def audited_count(self, count):
        need(count, 'audited real-member count')
        best = max(self.best, count)
        add = released(best) - released(self.best)
        for p, s in POTS.items():
            self._move('work_unreleased', f'pot:{p}', add * s)
        self.best = best
        self.verify()

    def round_buy(self, q):
        self._move('rounds_unsold', 'members', q)
        self.verify()

    def pay_from_pot(self, pot, q):
        self._move(f'pot:{pot}', 'members', q)
        self.paid_from_release += q
        self.verify()

    def to_recycled(self, q):                      # Q spent in THE SHOP, or bought back by THE QUIT WINDOW
        self._move('members', 'recycled', q)
        self.recycled_in += q
        self.verify()

    def pay_from_recycled(self, q):
        self._move('recycled', 'members', q)
        self.recycled_out += q
        self.verify()

    def verify(self):
        check(sum(self.bal.values()) == N, 'the ledger holds exactly 3,000,000,000 Q')
        check(all(v >= 0 for v in self.bal.values()), 'no ledger account below zero')
        check(self.paid_from_release <= released(self.best), 'the pots paid more than the release allows')
        check(self.recycled_out <= self.recycled_in, 'recycled Q paid out is never more than recycled Q received')


L = QLedger()
L.round_buy(10_000_000)
L.audited_count(120_000)
for p in POTS:
    L.pay_from_pot(p, L.bal[f'pot:{p}'])            # the hardest case: every released Q already paid
paid_at_peak = L.paid_from_release
L.audited_count(90_000)                             # a dip: nothing is released and nothing is taken back
check(L.best == 120_000 and L.paid_from_release <= released(L.best), 'T5: a dip leaves the release check true')
old_rule_fails = paid_at_peak > released(90_000)
check(old_rule_fails, 'on the old rule (release on the current count) this valid history fails the ledger check')
L.to_recycled(1_000_000)                            # spent in THE SHOP
L.to_recycled(2_000_000)                            # bought back by THE QUIT WINDOW
L.pay_from_recycled(2_500_000)
try:
    L.pay_from_recycled(1_000_000)                  # only 500,000 recycled Q left
except AssertionError:
    pass
else:
    raise AssertionError('the recycled account paid more than it received')
release_ratchet = dict(
    audited_counts=[120_000, 90_000], counted=L.best, released_at_peak=float(released(120_000)),
    released_at_dip_old_rule=float(released(90_000)), paid_before_dip=float(paid_at_peak),
    old_rule_check_fails=old_rule_fails, recycled_in=float(L.recycled_in), recycled_paid=float(L.recycled_out),
    balances={k: float(v) for k, v in L.bal.items()})


# ---- D18 and T6: what each pot pays each day (A11, A14) -----------------------------------------------------------
def pot_days(daily_counts, days_left, start_count=0):
    """Each day: the release follows the highest audited count (T5) and splits into the seven pots. The MINING
    (holding) and games pots pay each day's release evenly over the next 180 days (D18). Every other pot has a daily
    budget (T6): what it holds plus what the rest of the stage will add, over the expected days left in the stage, and
    never more than it holds. days_left is a forecast and an input; a missing or non-positive value throws."""
    check(len(daily_counts) == len(days_left), 'one forecast per day')
    even, even_pots = P('even_release_days'), P('even_release_pots')
    best = start_count
    bal = {p: F(0) for p in POTS}
    cum_in, cum_paid = {p: F(0) for p in POTS}, {p: F(0) for p in POTS}
    hist = {p: [] for p in even_pots}
    rows = []
    for t, (count, left) in enumerate(zip(daily_counts, days_left)):
        need(count, f'audited count, day {t}')
        need(left, f'expected days left in the stage, day {t}')
        check(left > 0, f'expected days left must be above 0, day {t}')
        nb = max(best, count)
        rel = released(nb) - released(best)
        best = nb
        stage_end = released(stages[stage_index(best)]['members_to'])
        row = dict(day=t, count=best, release=rel)
        for p, s in POTS.items():
            inflow = rel * s
            bal[p] += inflow
            cum_in[p] += inflow
            if p in even_pots:
                hist[p].append(inflow)
                pay = sum(hist[p][-even - 1:-1], F(0)) / even        # releases of the 180 days before today
            else:
                pay = min(bal[p], (bal[p] + s * (stage_end - released(best))) / left)
            check(pay <= bal[p], f'{p} cannot pay more than it holds, day {t}')
            bal[p] -= pay
            cum_paid[p] += pay
            check(cum_paid[p] <= cum_in[p], f'{p} paid more than it received, day {t}')
            row[p] = pay
        rows.append(row)
    return rows


days, viral, extra, rate = (A('pot_scenario_days'), A('pot_scenario_viral_day'), A('pot_scenario_viral_extra'),
                            A('growth_forecast_per_day'))
counts = [rate * (t + 1) + (extra if t >= viral else 0) for t in range(days)]
check(max(counts) < stages[0]['members_to'], 'the pot scenario stays inside stage 1')
forecast_left = [F(stages[0]['members_to'] - c, rate) for c in counts]
pot_rows = pot_days(counts, forecast_left)
steady_holding = rate * stages[0]['q_per_new_member'] * POTS['holding_quit']
check(pot_rows[viral - 1]['holding_quit'] == steady_holding, 'D18: 180 days of steady joins pay a steady MINING day')
actions = A('expected_actions_per_day')
jb_share = POTS['job_board']
pot_scenario = dict(
    new_members_a_day=rate, viral_day=viral, viral_extra_members=extra, expected_actions_a_day=actions,
    days={str(t): {k: float(v) for k, v in pot_rows[t].items()} for t in (viral - 1, viral, viral + 1, days - 1)},
    job_board_q_per_action={str(t): float(pot_rows[t]['job_board'] / actions) for t in (viral - 1, viral, viral + 1)},
    job_board_q_per_action_old_rule_viral_day=float((rate + extra) * stages[0]['q_per_new_member'] * jb_share
                                                    / actions))
check(pot_scenario['job_board_q_per_action'][str(viral)] < pot_scenario['job_board_q_per_action_old_rule_viral_day'] / 5,
      'T6: one viral day no longer pays several times the usual task')
pot_daily = []                                       # steady state: joins at a constant rate for 180 days or more
for s in stages[:3]:
    for per_day in (100, 300, 1_000):
        pot_daily.append(dict(stage=s['stage'], new_members_a_day=per_day,
                              **{p: float(per_day * s['q_per_new_member'] * sh) for p, sh in POTS.items()}))
mining_example = []
w = A('mining_example_quit') * A('mining_example_multiplier')
for row in pot_daily:
    mining_example.append(dict(stage=row['stage'], new_members_a_day=row['new_members_a_day'],
                               holding_q_a_day=row['holding_quit'],
                               total_weight_for_example=row['holding_quit'] * w / A('mining_example_q_today')))


def mining_today(holding_q_today, weight, total_weight):
    """D18: a member's MINING Q for the day is the day's holding amount times their weight over all weight."""
    need(holding_q_today, "the day's holding amount"); need(weight, 'member weight'); need(total_weight, 'all weight')
    check(0 <= weight <= total_weight and total_weight > 0, 'a weight is part of the total')
    return holding_q_today * weight / total_weight


check(abs(mining_today(72_000, w, 72_000 * w / 180) - 180) < 1e-9, 'MINING share arithmetic')


# ---- T7 and D05: the meter reads the rule-based real-member count (A03, A09) ----------------------------------------
REAL_ACTIONS = {   # the closed list (T5): only these keep a member real
    'checked_work_paid': 'paid work that passed its check: a job, task, raid, bounty or event',
    'purchase': 'a buy: Q in a round, $QUIT through QUIT, or a shop or plan payment',
    'course_passed': 'a course passed in THE ACADEMY'}
NOT_REAL_ACTIONS = {'sign_in', 'free_play', 'holding_only', 'invite_sent', 'profile_change', 'xp_or_badge'}


def is_real_member(record, today):
    """Real member: signed in, checked, not a team account, and a real action in the last 30 days. An action that is
    on neither list throws, so the list stays closed."""
    signed_in, checked, team, acts = req(record, ('signed_in', 'checked', 'team_account', 'actions'), 'member record')
    need(today, 'today')
    real = False
    for kind, day in acts:
        need(kind, 'action kind'); need(day, 'action day')
        if kind not in REAL_ACTIONS and kind not in NOT_REAL_ACTIONS:
            raise ValueError(f'action {kind!r} is on neither list of real and other actions')
        if kind in REAL_ACTIONS and 0 <= today - day < P('real_member_days'):
            real = True
    return bool(signed_in and checked and not team and real)


base_rec = dict(signed_in=True, checked=True, team_account=False)
check(is_real_member(dict(base_rec, actions=[('checked_work_paid', 90)]), 100), 'paid checked work 10 days ago')
check(not is_real_member(dict(base_rec, actions=[('sign_in', 99), ('free_play', 99)]), 100), 'sign-ins are not real')
check(not is_real_member(dict(base_rec, actions=[('holding_only', 99)]), 100), 'holding alone is not real')
check(not is_real_member(dict(base_rec, actions=[('purchase', 60)]), 100), 'a buy 40 days ago has lapsed')
check(not is_real_member(dict(base_rec, team_account=True, actions=[('purchase', 99)]), 100), 'team accounts never count')
try:
    is_real_member(dict(base_rec, actions=[('watched_film', 99)]), 100)
except ValueError:
    pass
else:
    raise AssertionError('an action off the closed list was accepted')
try:
    is_real_member(dict(signed_in=True, checked=True, actions=[]), 100)
except MissingInput:
    pass
else:
    raise AssertionError('a member record without team_account was accepted')


def meter(highest_count, live_count, audited_revenue_12m=None, revenue_as_of=None):
    """T7 and D05. The counts are the rule-based real-member count (is_real_member); None until the first count runs,
    and then the meter says CHECKING. The headline is the highest member milestone ever reached (shown from 10,000,
    MP-D30). A dollar figure appears only as 10 times audited revenue over the last 12 months, with its date."""
    if highest_count is None or live_count is None:
        return dict(state='CHECKING')
    check(0 <= live_count <= highest_count, 'the live count is never above the highest count ever reached')
    reached = max((m for m in MILESTONES if m <= highest_count), default=None)
    nxt = next((m for m in MILESTONES if m > highest_count), None)
    out_ = dict(state='LIVE', milestone_reached=reached, live_count=live_count, next_milestone=nxt, dollar_value=None,
                dollar_as_of=None)
    if audited_revenue_12m is not None:
        out_['dollar_value'] = P('meter_multiple') * audited_revenue_12m
        out_['dollar_as_of'] = need(revenue_as_of, 'date of the audited revenue')
    return out_


meter_cases = {
    'before the first count': meter(None, None),
    'below 10,000': meter(8_000, 7_900),
    'past 10,000, live count dips': meter(12_000, 9_500),
    'with 12 months of audited revenue': meter(12_000, 11_000, audited_revenue_12m=1_200_000,
                                               revenue_as_of='31 Dec 2027')}
check(meter_cases['before the first count'] == {'state': 'CHECKING'}, 'T7: CHECKING until the first count runs')
check(meter_cases['below 10,000']['milestone_reached'] is None, 'MP-D30: next step only below 10,000')
check(meter_cases['past 10,000, live count dips']['milestone_reached'] == 10_000, 'the headline never goes back')
check(meter_cases['past 10,000, live count dips']['dollar_value'] is None, 'D05: no dollar figure before OPEN BOOKS')
check(meter_cases['with 12 months of audited revenue']['dollar_value'] == 12_000_000, 'D05: 10 x audited revenue')
try:
    meter(12_000, 11_000, audited_revenue_12m=1_200_000)
except MissingInput:
    pass
else:
    raise AssertionError('a dollar figure without its date was accepted')


# ---- D23: profit payouts on distributable profit (A06, A19) --------------------------------------------------------
def payout_split(payout_usd, people_q, founder_unlocked_q, team_counted_q):
    """One payout under the 85/15 rule (MP-D46): every Q that counts is paid the same, the Founder at most 5% and the team at
    most 10%, anything above a cap to the people's Q. team_counted_q is team Q granted, vested and unlocked (D15)."""
    for v, n in ((payout_usd, 'payout'), (people_q, "people's Q held"), (founder_unlocked_q, "the Founder's unlocked Q"),
                 (team_counted_q, 'team Q that counts')):
        need(v, n)
        check(v >= 0, f'{n} is never negative')
    check(founder_unlocked_q <= ALLOC['founder'] and team_counted_q <= ALLOC['team'] and people_q <= PEOPLE, 'Q bounds')
    qc = people_q + founder_unlocked_q + team_counted_q
    check(qc > 0, 'no Q counts on this record date')
    d = F(payout_usd)
    founder = min(d * F(founder_unlocked_q, qc), P('founder_cap') * d)
    team = min(d * F(team_counted_q, qc), P('team_cap') * d)
    people = d - founder - team
    check(people >= F(85, 100) * d, 'the people get at least 85% of every payout')
    if people_q:
        per_people_q = people / people_q
        check(founder_unlocked_q == 0 or per_people_q >= founder / founder_unlocked_q, "a people's Q is never paid less than the Founder's")
        check(team_counted_q == 0 or per_people_q >= team / team_counted_q, "a people's Q is never paid less than the team's")
    return dict(payout=float(d), people=float(people), founder=float(founder), team=float(team),
                people_share=float(people / d) if d else None, founder_share=float(founder / d) if d else None,
                team_share=float(team / d) if d else None, per_people_q=float(people / people_q) if people_q else None)


def payout_schedule(quarters):
    """D23: each payout is at least 50% of distributable profit: audited profit since the last payout, after earlier
    losses are recovered and 6 months of operating costs are kept in reserve, measured before non-cash Q pay. The whole
    distributable amount is used each time: the payout, then THE QUIT WINDOW and growth (WHITE-PAPER 4.3)."""
    share, months = P('payout_share_floor'), P('payout_reserve_months')
    carried, rows = F(0), []
    for i, q in enumerate(quarters):
        profit, cost_m, cash = req(q, ('profit_before_q_pay', 'monthly_operating_cost', 'cash_before_payout'),
                                   f'quarter {i + 1}')
        check(cost_m >= 0, 'operating cost is never negative')
        carried += profit
        base = max(F(0), min(carried, F(cash) - months * F(cost_m)))
        carried -= base
        rows.append(dict(quarter=i + 1, profit_before_q_pay=profit, reserve=months * cost_m, distributable=float(base),
                         payout=float(share * base), carried_after=float(carried),
                         payout_as_mp_d9_was_written=float(share * max(0, profit))))
    return rows


rich = 10_000_000
volatile = payout_schedule([dict(profit_before_q_pay=p, monthly_operating_cost=100_000, cash_before_payout=rich)
                            for p in (-400_000, 400_000, -400_000, 400_000)])
check(sum(r['payout'] for r in volatile) == 0, 'D23: losses are recovered before anything is paid')
check(sum(r['payout_as_mp_d9_was_written'] for r in volatile) == 400_000, 'the audit A06 case as MP-D9 was written')
recovered = payout_schedule([dict(profit_before_q_pay=p, monthly_operating_cost=100_000, cash_before_payout=rich)
                             for p in (-300_000, 200_000, 500_000)])
check([r['payout'] for r in recovered] == [0, 0, 200_000], 'D23: pays on the profit left after earlier losses')
reserved = payout_schedule([dict(profit_before_q_pay=1_000_000, monthly_operating_cost=200_000,
                                 cash_before_payout=1_500_000)])
check(reserved[0]['distributable'] == 300_000 and reserved[0]['carried_after'] == 700_000, 'D23: the reserve comes first')
first_unlock = dict(people_q=460_000_000, founder_unlocked_q=ALLOC['founder'] // 4, team_counted_q=ALLOC['team'] // 4)
payout_cases = {
    'before the first unlock': payout_split(500_000, 300_000_000, 0, 0),
    'first unlock at 100,000, all team Q granted': payout_split(500_000, **first_unlock),
    'first unlock, half the team Q granted': payout_split(500_000, 460_000_000, ALLOC['founder'] // 4, ALLOC['team'] // 8),
    'first unlock, no team Q granted': payout_split(500_000, 460_000_000, ALLOC['founder'] // 4, 0),
    'full issuance': payout_split(500_000, PEOPLE, ALLOC['founder'], ALLOC['team'])}
c = payout_cases['first unlock at 100,000, all team Q granted']
check((c['people'], c['founder'], c['team']) == (425_000, 25_000, 50_000), 'per $1M of profit: 425,000 / 25,000 / 50,000')
check(payout_cases['before the first unlock']['people_share'] == 1, 'before the first unlock the people get it all')
c = payout_cases['full issuance']
check((c['people_share'], c['founder_share'], c['team_share']) == (0.85, 0.05, 0.10), 'full issuance pays 85/5/10')
for name, c in payout_cases.items():
    check(c['people_share'] >= 0.85 and c['founder_share'] <= 0.05 and c['team_share'] <= 0.10, name)


# ---- D24 and D25: the Q reference price and THE QUIT WINDOW (A07) ----------------------------------------------------
def reference_price(last_round_price, audited_revenue_12m):
    """D24: one published price a quarter, the lower of the last round's price and 10 times audited revenue over the
    last 12 months divided by 3,000,000,000. Both inputs are required."""
    need(last_round_price, "the last round's price"); need(audited_revenue_12m, 'audited revenue, last 12 months')
    check(last_round_price > 0 and audited_revenue_12m >= 0, 'reference price inputs')
    return min(F(last_round_price), P('reference_multiple') * F(audited_revenue_12m) / N)


def q_price_now(open_round_price, reference):
    """D24: the shop, cash back and statements use the open round's price, or the reference price when none is open."""
    if open_round_price is not None:
        return F(open_round_price)
    return F(need(reference, 'the Q reference price (no round is open, D24)'))


def window(profit_not_paid_out, window_share, price, reference, offers):
    """D25: THE QUIT WINDOW for one quarter. Its budget is the share THE BOARD sets of the profit not paid out, at most
    half. It buys at or below the reference price. Offers fill pro rata, each capped at 2% of the quarter's cap. Bought
    Q can be offered after 12 months, earned Q after 6 months READY, and only after the identity check."""
    need(profit_not_paid_out, 'profit not paid out'); need(window_share, "the Window's share"); need(price, 'price')
    need(reference, 'the Q reference price')
    check(0 <= window_share <= P('window_max_share_of_unpaid_profit'), 'D25: at most half of the profit not paid out')
    check(0 < price <= reference, 'D25: the Window buys at or below the reference price')
    check(P('window_open_business_days') >= 20, 'open at least 20 business days')
    if profit_not_paid_out <= 0:
        return dict(state='CLOSED', budget=0, q_bought=0, cash_paid=0)
    budget = F(window_share) * F(profit_not_paid_out)
    cap_q = budget / F(price)
    acct_cap = P('window_account_cap_share') * cap_q
    rows = []
    for i, o in enumerate(offers):
        q, kind, months, idc, count = req(o, ('q', 'kind', 'months', 'id_checked', 'count'), f'Window offer {i + 1}')
        check(kind in ('bought', 'earned'), f'Window offer {i + 1}: kind is bought or earned')
        wait = P('window_bought_months') if kind == 'bought' else P('window_earned_ready_months')
        rows.append(dict(o, eligible_q=min(F(q), acct_cap) if (idc and months >= wait) else F(0)))
    total = sum((r['eligible_q'] * r['count'] for r in rows), F(0))
    ratio = min(F(1), cap_q / total) if total else F(0)
    for r in rows:
        r['filled_q'] = r['eligible_q'] * ratio
        check(r['filled_q'] <= acct_cap, 'no account fills above its cap')
    bought = sum((r['filled_q'] * r['count'] for r in rows), F(0))
    cash = bought * F(price)
    check(bought <= cap_q and cash <= budget, "the Window never spends more than its budget")
    return dict(state='OPEN', budget=float(budget), price=float(price), cap_q=float(cap_q), account_cap_q=float(acct_cap),
                eligible_q=float(total), fill_ratio=float(ratio), q_bought=float(bought), cash_paid=float(cash),
                offers=[dict(who=r['who'], count=r['count'], offered_q=r['q'], eligible_q=float(r['eligible_q']),
                             filled_q=float(r['filled_q'])) for r in rows])


we = A('window_example')
ref = reference_price(PRICE[we['last_round']], we['audited_revenue_12m'])
check(ref == min(PRICE[4], F(10 * 2_000_000, N)), 'D24 reference price')
paid_out = P('payout_share_floor') * we['distributable']
window_example = window(we['distributable'] - paid_out, we['window_share'], ref, ref, we['offers'])
window_example.update(reference_price=float(ref), last_round_price=float(PRICE[we['last_round']]),
                      audited_revenue_12m=we['audited_revenue_12m'], distributable=we['distributable'],
                      payout=float(paid_out))
check(window(0, F(1, 2), ref, ref, we['offers'])['state'] == 'CLOSED', 'the Window buys only in a quarter with profit')
for bad in (dict(window_share=F(6, 10), price=ref), dict(window_share=F(1, 2), price=ref * 2)):
    try:
        window(250_000, bad['window_share'], bad['price'], ref, we['offers'])
    except AssertionError:
        pass
    else:
        raise AssertionError(f'the Window accepted {bad}')


# ---- D20: QUIT Card Q back, and THE SHOP's 5% back -----------------------------------------------------------------
def card_q_back(spend, cash_like, interchange_rate, q_back_rate, cap_usd_month, id_checked, q_price):
    """D20: one person's Q back for a month. Paid only from the interchange QUIT receives, at a rate below it, capped
    per verified person per month, cash-like merchants left out. Until a card provider is chosen there is no
    interchange figure, so interchange_rate=None throws."""
    need(spend, 'card spend'); need(cash_like, 'cash-like merchant list')
    need(interchange_rate, 'interchange QUIT receives (no card provider is chosen yet, D20)')
    need(q_back_rate, 'Q back rate'); need(cap_usd_month, 'monthly cap'); need(id_checked, 'identity check')
    need(q_price, 'Q price (open round or reference, D24)')
    check(0 < q_back_rate < interchange_rate, 'D20: the Q back rate is below the interchange QUIT receives')
    eligible = sum((F(v) for k, v in spend.items() if k not in cash_like), F(0))
    interchange = eligible * F(interchange_rate)
    usd = min(eligible * F(q_back_rate), F(cap_usd_month)) if id_checked else F(0)
    check(usd <= interchange, 'D20: Q back is paid only from interchange')
    return dict(eligible_spend=float(eligible), interchange=float(interchange), q_back_usd=float(usd),
                q=float(usd / F(q_price)))


try:
    card_q_back({'groceries': 100}, set(), None, F(1, 200), 10, True, PRICE[1])
except MissingInput:
    pass
else:
    raise AssertionError('card Q back ran without an interchange figure')
ct = A('card_function_test')
card_test = card_q_back(ct['spend'], {'cash_like'}, ct['interchange_rate'], ct['q_back_rate'], ct['cap_usd_month'],
                        True, PRICE[1])
check(card_test['q_back_usd'] == 2.75 and card_test['interchange'] == 5.5, 'card Q back function test')
check(card_q_back(ct['spend'], {'cash_like'}, ct['interchange_rate'], ct['q_back_rate'], ct['cap_usd_month'], False,
                  PRICE[1])['q'] == 0, 'D12 and D20: no Q back before the identity check')


def shop_cash_back(card_paid_usd, q_price):
    """THE SHOP: 5% of every card payment back in Q at the open round's price, or the reference price when no round is
    open (D24). D24 leaves cash-back Q out of a round's sold count; which account the Q is drawn from is not written
    yet (MODEL-CHANGES.md, open question), so this returns the Q owed and books nothing."""
    need(card_paid_usd, 'card payment'); need(q_price, 'Q price')
    return P('shop_cash_back_rate') * F(card_paid_usd) / F(q_price)


check(shop_cash_back(49, q_price_now(PRICE[1], None)) == F(3_675, 4), 'TOKENOMICS-REPORT 12.1: $49 with round 1 open, 918.75 Q')
try:
    q_price_now(None, None)
except MissingInput:
    pass
else:
    raise AssertionError('a Q price with no open round and no reference price was accepted')
cash_back = dict(
    shop_49_round_1_open=float(shop_cash_back(49, q_price_now(PRICE[1], None))),
    shop_49_no_round_open=float(shop_cash_back(49, q_price_now(None, ref))), reference_price_used=float(ref),
    card_q_back=dict(state='no rate until the card provider is chosen (D20)', function_test=card_test,
                     function_test_inputs={k: (float(v) if isinstance(v, F) else v) for k, v in ct.items()}))


# ---- D04 and the contribution margin of each revenue line (A01) ---------------------------------------------------
def wx_job(builder, first_month, related, commission_base):
    """One $150 Work Exchange job, QUIT's net after card fees, AI work, a chargeback reserve and Builder pay. D04 pays
    Builders on QUIT's share of the job. commission_base: 'cut' (QUIT's $30, as JB-1 and MK-2 print $12.00 and $7.50),
    'cut_after_fees' (QUIT's $30 after card fees, D04's words) or 'job_price' (the replaced rule)."""
    price, cut = P('wx_job_price'), P('wx_cut')
    keep = price * cut
    fee = price * A('card_fee_rate') + A('card_fee_fixed')
    base = {'cut': keep, 'cut_after_fees': keep - fee, 'job_price': F(price)}[commission_base]
    direct = P('builder_rate_first_month') if first_month else P('builder_rate_after')
    rate = F(0) if (not builder or related) else min(direct + P('builder_team_levels'), P('builder_cap'))
    field = rate * base
    net = keep - fee - A('wx_ai_cost_per_job') - A('chargeback_reserve_rate') * price - field
    return dict(job=price, quit_keeps=float(keep), card_fee=float(fee), ai=A('wx_ai_cost_per_job'),
                chargeback_reserve=float(A('chargeback_reserve_rate') * price), builder_pay=float(field),
                builder_rate=float(rate), quit_net=float(net), margin_on_kept=float(net / keep))


wx_rows = {
    'direct, no Builder': wx_job(False, False, False, 'cut'),
    "Builder-brought, first month, on QUIT's $30": wx_job(True, True, False, 'cut'),
    "Builder-brought, after, on QUIT's $30": wx_job(True, False, False, 'cut'),
    "Builder-brought, first month, on QUIT's $30 after card fees": wx_job(True, True, False, 'cut_after_fees'),
    "Builder-brought, after, on QUIT's $30 after card fees": wx_job(True, False, False, 'cut_after_fees'),
    'business, pilot and Builder related: no commission': wx_job(True, True, True, 'cut')}
for name, r in wx_rows.items():
    check(r['quit_net'] > 0, f'D04: QUIT keeps money on every Work Exchange job ({name})')
wx_replaced = {'replaced rule, first month, on the job price': wx_job(True, True, False, 'job_price'),
               'replaced rule, after, on the job price': wx_job(True, False, False, 'job_price')}
for name, r in wx_replaced.items():
    check(r['quit_net'] < 0, f'the replaced rule loses money ({name})')
direct_only = {k: float(P(k) * P('wx_job_price') * P('wx_cut')) for k in ('builder_rate_first_month', 'builder_rate_after')}
check(direct_only == {'builder_rate_first_month': 12.0, 'builder_rate_after': 7.5},
      "JB-1 and MK-2: the direct Builder's $12.00 and $7.50 on QUIT's $30")

CS = json.loads((ROOT / 'designs/v5-pages/creator_studio_model_out.json').read_text())
CS_CHANNELS = {'direct, card': 'full', 'direct, half Q': 'halfq', 'Builder-sold, card': 'builder',
               'Builder-sold, half Q': 'builder_halfq'}
CS_APPROVED_LOSSES = {('STARTER', 'Builder-sold, half Q'), ('WEEKLY', 'Builder-sold, half Q')}   # CREATOR-STUDIO-PLANS
                                                                    # 1.2 at full use, approved with the plans (MP-D38, MP-D41)
cs_cells, cs_losses = {}, set()
for plan in A('cs_plan_mix'):
    for ch, key in CS_CHANNELS.items():
        cell = req(req(CS, ('plans',), 'creator_studio_model_out.json')[0], (plan,), 'Creator Studio plans')[0]
        margin, card = req(cell[key], ('margin', 'card'), f'Creator Studio {plan} {key}')
        cs_cells[f'{plan}, {ch}'] = dict(margin=margin, card=card, cash_margin=margin / card)
        if margin < 0:
            cs_losses.add((plan, ch))
check(cs_losses <= CS_APPROVED_LOSSES, f'a Creator Studio cell loses money that the approved plans do not show: '
                                       f'{sorted(cs_losses - CS_APPROVED_LOSSES)}')
bs, hq = A('cs_builder_sold_share'), A('cs_half_q_share')
ch_w = {'direct, card': (1 - bs) * (1 - hq), 'direct, half Q': (1 - bs) * hq, 'Builder-sold, card': bs * (1 - hq),
        'Builder-sold, half Q': bs * hq}
cs_m = sum(float(A('cs_plan_mix')[p] * ch_w[ch]) * cs_cells[f'{p}, {ch}']['margin'] for p in A('cs_plan_mix') for ch in ch_w)
cs_c = sum(float(A('cs_plan_mix')[p] * ch_w[ch]) * cs_cells[f'{p}, {ch}']['card'] for p in A('cs_plan_mix') for ch in ch_w)
go_viral = {}
for k in ('go_viral', 'go_viral_plus'):               # ON LOCATION waits for a signed videographer (MP-D41)
    gm, bm = req(CS[k], ('gm', 'builder_margin'), k)
    check(gm > 0 and bm > 0, f'{k} keeps money direct and Builder-sold')
    go_viral[k] = dict(margin_direct=gm, margin_builder_sold=bm)
wx_bs, wx_fm = A('wx_builder_share'), A('wx_first_month_share')
wx_blend = (float(1 - wx_bs) * wx_rows['direct, no Builder']['margin_on_kept']
            + float(wx_bs * wx_fm) * wx_rows["Builder-brought, first month, on QUIT's $30"]['margin_on_kept']
            + float(wx_bs * (1 - wx_fm)) * wx_rows["Builder-brought, after, on QUIT's $30"]['margin_on_kept'])


def line_margin(price, cost_to_serve, card_fee, q_back, field_pay):
    """Contribution of one sale of a revenue line. Every input is required; THE ACADEMY and data licences have no
    price or cost in the plan yet, so they cannot be computed and are not counted."""
    for v, n in ((price, 'price'), (cost_to_serve, 'cost to serve'), (card_fee, 'card fee'), (q_back, 'Q back'),
                 (field_pay, 'field pay')):
        need(v, n)
    return price - cost_to_serve - card_fee - q_back - field_pay


try:
    line_margin(None, None, None, None, None)
except MissingInput:
    pass
else:
    raise AssertionError('a revenue line without inputs was computed')
margins = {
    'creator_studio': dict(cells=cs_cells, approved_losses=sorted(f'{p}, {c}' for p, c in CS_APPROVED_LOSSES),
                           blended_margin_a_month=cs_m, blended_cash=cs_c, blended_cash_margin=cs_m / cs_c,
                           go_viral=go_viral),
    'work_exchange': dict(jobs=wx_rows, replaced_rule=wx_replaced, blended_margin_on_kept=wx_blend,
                          direct_builder_pay_on_quit_cut=direct_only),
    'academy': dict(state='no price or cost in the plan; not counted in the cash plan'),
    'data_licences': dict(state="the dividend share is set before the first outside licence (WHITE-PAPER 3.5); "
                                "not counted in the cash plan")}
check(margins['creator_studio']['blended_cash_margin'] > 0 and wx_blend > 0, 'every costed revenue line keeps money')
check(sum(A('revenue_mix').values()) == 1, 'the revenue mix adds to 100%')
CM_BLEND = (float(A('revenue_mix')['creator_studio']) * margins['creator_studio']['blended_cash_margin']
            + float(A('revenue_mix')['work_exchange']) * wx_blend)
margins['blended_contribution_margin'] = CM_BLEND


# ---- A12 and D08: the whole stage 1 population, not one mix --------------------------------------------------------
def largest_remainder(weights, total):
    s = sum(weights.values())
    raw = {k: F(v * total, s) for k, v in weights.items()}
    out_ = {k: int(x) for k, x in raw.items()}
    for k in sorted(raw, key=lambda k: (-(raw[k] - out_[k]), k))[:total - sum(out_.values())]:
        out_[k] += 1
    return out_


def population_check(spread, stage=0):
    """Pay per action is Q left over actions expected, so a pot is never overdrawn: when the stage population asks for
    more than a pot holds, every action in that pot pays less. Members brought can never exceed the stage's members.
    Returns the pay as a share of the example rates, per pot, and the expected Q per path and per active member."""
    st = stages[stage]
    members = st['members_to'] - st['members_from']
    pot_q = {p: st['q'] * s for p, s in POTS.items()}
    earners = sum(spread.values())
    check(0 < earners <= members, 'the spread fits inside the stage')
    brought = sum(PATHS[w].get('active_member_brought', 0) * n for w, n in spread.items())
    bring = min(F(1), F(members, brought)) if brought else F(1)
    demand = {p: F(0) for p in POTS}
    for w, n in spread.items():
        for a, k in PATHS[w].items():
            scale = bring if a == 'active_member_brought' else 1
            demand[POT_OF[a]] += RATES[a] * k * n * scale
            if a == 'active_member_brought':
                demand['invites_and_creators'] += NEWCOMER * k * n * scale
    pay = {p: (min(F(1), pot_q[p] / demand[p]) if demand[p] else F(1)) for p in POTS}
    for p in POTS:
        check(demand[p] * pay[p] <= pot_q[p], f'{p} is never overdrawn')
    per_path = {}
    for w, n in spread.items():
        q = sum(RATES[a] * k * (bring if a == 'active_member_brought' else 1) * pay[POT_OF[a]]
                for a, k in PATHS[w].items())
        per_path[w] = dict(people=n, q_at_example_rates=sum(RATES[a] * k for a, k in PATHS[w].items()), q_expected=float(q))
    paid = sum(F(v['q_expected']) * v['people'] for v in per_path.values())
    return dict(earners=earners, participation=float(F(earners, members)), members_brought=float(brought * bring),
                pay_share_of_example={p: float(v) for p, v in pay.items() if demand[p]}, paths=per_path,
                expected_q_per_active_member=float(paid / earners))


population = {}
for name, spec in A('participation_spreads').items():
    spread = MIX if spec == 'MIX' else (largest_remainder(MIX, spec) if isinstance(spec, int) else spec)
    population[name] = population_check(spread)
check(all(v == 1 for v in population['the example mix']['pay_share_of_example'].values()),
      'the example mix is paid in full, as the example-mix check says')
check(abs(population['10% work like the student']['pay_share_of_example']['job_board'] - 36 / 115) < 1e-12,
      'audit A12: 10% working like the student cut task pay to 31% of the example')
check(abs(population['50% work like the student']['pay_share_of_example']['job_board'] - 36 / 575) < 1e-12,
      'audit A12: 50% cut it to 6.3%')


# ---- D13 and D12: the people's dividend split by checked work, capped, after the identity check (A04) --------------
def dividend_split(dividend_usd, groups):
    """D13: weight = Q earned through checked work times days held, days counted from the first checked job. Only
    identity-checked real members on the record date count (D12). Each weight is capped at 5 times the median weight,
    so no one is paid more than 5 times the median. groups: records with a count of identical accounts."""
    need(dividend_usd, 'dividend')
    rows = []
    for i, g in enumerate(groups):
        count, idc, real, qd = req(g, ('count', 'id_checked', 'real_on_record_date', 'checked_work_q_days'),
                                   f'dividend group {i + 1}')
        check(count >= 0 and qd >= 0, f'dividend group {i + 1}')
        rows.append(dict(g, weight=F(qd) if (idc and real and qd > 0) else F(0)))
    elig = sorted((r for r in rows if r['weight'] > 0), key=lambda r: r['weight'])
    n = sum(r['count'] for r in elig)
    check(n > 0, 'nobody qualifies for the dividend')
    half, seen, median = F(n + 1, 2), 0, None                     # median over accounts, not groups
    for r in elig:
        seen += r['count']
        if seen >= half:
            median = r['weight']
            break
    cap = P('dividend_cap_x_median') * median
    total_w = sum((min(r['weight'], cap) * r['count'] for r in rows), F(0))
    for r in rows:
        r['per_account'] = F(dividend_usd) * min(r['weight'], cap) / total_w
    paid = sum((r['per_account'] * r['count'] for r in rows), F(0))
    check(abs(paid - F(dividend_usd)) < F(1, 10 ** 6), 'the dividend is paid in full, no more')
    median_pay = F(dividend_usd) * median / total_w
    check(all(r['per_account'] <= P('dividend_cap_x_median') * median_pay for r in rows), 'D13: at most 5x the median')
    return dict(dividend=float(dividend_usd), eligible_accounts=n, median_weight=float(median),
                median_pay=float(median_pay),
                groups=[dict(group=r.get('group', ''), count=r['count'], per_account=float(r['per_account']),
                             total=float(r['per_account'] * r['count'])) for r in rows])


ex_sale = sale(A('dividend_example_sale_price'), 460_000_000, team_q_vested=ALLOC['team'])
dividend_example = dividend_split(ex_sale['dividend'], A('dividend_example_population'))
dividend_example['sale_price'] = A('dividend_example_sale_price')
for gr in dividend_example['groups']:
    if 'no checked work' in gr['group'] or 'no identity check' in gr['group']:
        check(gr['total'] == 0, f"A04: {gr['group']} receive $0")


# ---- A10 and D15: the sale with team grants at 0%, 50% and 100% of the pool ----------------------------------------
sale_cases = []
for price in (60_000_000, 3_000_000_000):
    for grants in (F(0), F(1, 2), F(1)):
        for issued in (0, 460_000_000, PEOPLE):
            s = sale(price, issued, team_q_vested=int(ALLOC['team'] * grants))
            check(s['people_share'] >= 0.85 - 1e-12 and s['founder_share'] <= 0.05 + 1e-12, 'A10: people >= 85%, Founder <= 5%')
            sale_cases.append(dict(price=price, team_granted_share=float(grants), people_q_issued=issued,
                                   people_share=s['people_share'], founder_share=s['founder_share'],
                                   team_share=s['team_share'], dividend=s['dividend']))


# ---- D22: a dated cash plan with a hard monthly cost cap (A05) ------------------------------------------------------
MONTH_NAMES = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']


def month_label(i):
    y, m = A('cash_plan_start')
    k = (m - 1) + (i - 1)
    return f'{MONTH_NAMES[k % 12]} {y + k // 12}'


def members_at(path, i):
    q, pos = (i - 1) // 3, (i - 1) % 3 + 1
    check(q < len(path), 'the member path is shorter than the cash plan')
    prev = 0 if q == 0 else path[q - 1]
    return prev + (path[q] - prev) * F(pos, 3)


def cash_plan(case, extra_start_cash=0):
    """Month by month from the cash plan start: rounds 1 to 4 sell at the case's pace; a gated round sells only while
    D26 reads OPEN on the audited quarters; contribution is revenue x the blended margin less variable costs; fixed
    costs are cut to the hard monthly cap (D22); payouts follow D23 and the Window takes the most D25 allows. Cash
    below zero throws."""
    c = A('cash_cases')[case]
    path, arpu, pace = A('member_paths')[c['path']], c['revenue_per_member'], c['rounds_1_4_months']
    runway, fixed, var = A('cost_cap_runway_months'), A('fixed_cost_month'), A('variable_cost_member_year')
    lag, refund, flag = A('audit_lag_quarters'), A('refund_rate'), A('flagged_revenue_rate')
    cm = F(CM_BLEND).limit_denominator(10 ** 9)
    sold = {k: F(0) for k in range(1, ROUNDS + 1)}
    start_reserve = A('starting_operating_reserve_usd')
    cash, carried, used_audits, rows, quarters = F(extra_start_cash) + start_reserve, F(0), 0, [], []
    acc = dict(revenue=F(0), refunds=F(0), flagged_revenue=F(0), profit=F(0), costs=F(0))
    opened = {}
    for i in range(1, A('cash_plan_months') + 1):
        members = members_at(path, i)
        gross = members * arpu / 12
        refunds, flagged = gross * refund, gross * flag
        margin = (gross - refunds) * cm
        variable = members * F(var, 12)
        round_cash, to_sell = F(0), (F(4 * PER_ROUND, pace) if i <= pace else F(0))
        for k in range(1, 5):
            take = min(to_sell, PER_ROUND - sold[k])
            sold[k] += take
            to_sell -= take
            round_cash += take * PRICE[k]
        audited = quarters[:max(0, len(quarters) - lag)]
        for k in range(5, ROUNDS + 1):
            if sold[k] < PER_ROUND:
                if all(sold[j] == PER_ROUND for j in range(1, k)) and audited and gate_states(k, audited)[-1] == 'OPEN':
                    take = min(F(PER_ROUND, A('gated_round_months')), PER_ROUND - sold[k])
                    sold[k] += take
                    round_cash += take * PRICE[k]
                    opened.setdefault(k, month_label(i))
                break
        cap = (cash + round_cash) / runway + max(F(0), margin)
        fixed_spend = max(F(0), min(F(fixed), cap - variable))
        check(variable + fixed_spend <= cap or fixed_spend == 0, 'D22: costs stay inside the monthly cap')
        cash += round_cash + margin - variable - fixed_spend
        acc['revenue'] += gross; acc['refunds'] += refunds; acc['flagged_revenue'] += flagged
        acc['profit'] += margin - variable - fixed_spend; acc['costs'] += variable + fixed_spend
        payout = window_paid = F(0)
        if i % 3 == 0:
            quarters.append(acc)
            acc = dict(revenue=F(0), refunds=F(0), flagged_revenue=F(0), profit=F(0), costs=F(0))
            ready = max(0, len(quarters) - lag)
            while used_audits < ready:
                carried += quarters[used_audits]['profit']
                used_audits += 1
            reserve = P('payout_reserve_months') * quarters[-1]['costs'] / 3
            base = max(F(0), min(carried, cash - reserve))
            carried -= base
            payout = P('payout_share_floor') * base
            window_paid = A('cash_plan_window_share') * (base - payout)
            check(window_paid <= P('window_max_share_of_unpaid_profit') * (base - payout), 'D25 budget')
            cash -= payout + window_paid
        check(cash >= 0, f'cash plan {case}: cash runs out in {month_label(i)}')
        rows.append(dict(month=month_label(i), members=float(members), revenue=float(gross - refunds),
                         round_cash=float(round_cash), spend=float(variable + fixed_spend), cap=float(cap),
                         cut=float(F(fixed) - fixed_spend), payout=float(payout), window=float(window_paid),
                         cash=float(cash)))
    check(all(0 <= sold[k] <= PER_ROUND for k in sold), f'no round sells more than its {PER_ROUND:,} Q')
    return rows, sold, opened


cash_plans = {}
for case in A('cash_cases'):
    rows, sold, opened = cash_plan(case)
    cut_months = [r['month'] for r in rows if r['cut'] > 0.005]
    lo, hi = 0.0, 100_000_000.0
    check(not any(r['cut'] > 0.005 for r in cash_plan(case, hi)[0]), f'cash plan {case}: the bridge search bound')
    for _ in range(50):                                      # the cash up front that runs planned costs uncut
        mid = (lo + hi) / 2
        if any(r['cut'] > 0.005 for r in cash_plan(case, mid)[0]):
            lo = mid
        else:
            hi = mid
    bridge = hi
    unsold_at_start = ALLOC['rounds'] - FOUNDING_RESERVE_Q   # the ten public rounds' Q
    cash_plans[case] = dict(
        inputs=A('cash_cases')[case], start=rows[0]['month'], end=rows[-1]['month'], rows=rows,
        round_q_sold={str(k): float(v) for k, v in sold.items() if v}, gated_rounds_opened=opened,
        round_cash=sum(r['round_cash'] for r in rows), months_cap_cuts_costs=len(cut_months),
        first_month_uncut=next((r['month'] for r in rows if r['cut'] <= 0.005), None),
        total_cuts=sum(r['cut'] for r in rows), payouts=sum(r['payout'] for r in rows),
        window=sum(r['window'] for r in rows), lowest_cash=min(r['cash'] for r in rows), end_cash=rows[-1]['cash'],
        first_payout=next((r['month'] for r in rows if r['payout'] > 0), None),
        bridge_to_run_planned_costs=bridge,
        bridge_q_at_round_1_price=bridge / float(PRICE[1]), bridge_q_at_round_4_price=bridge / float(PRICE[4]),
        bridge_fits_at_round_1_price=bridge / float(PRICE[1]) <= unsold_at_start,
        bridge_fits_at_round_4_price=bridge / float(PRICE[4]) <= (ROUNDS - 4) * PER_ROUND)



# ---- Public Ecosystem, Launchpad Fee & On-Chain $QUIT Supply Sink Invariants ----
lp_fee = P('launchpad_swap_fee')
check(sum(lp_fee.values()) == F(150, 10000), 'MP-D123 / MP-D134: launchpad swap fee sums to 1.50%')
check(lp_fee['creator'] + lp_fee['inviter'] + lp_fee['level_2'] + lp_fee['level_3'] == F(105, 10000),
      'Creator + 3-level invite shares sum to 1.05% (70% of the 1.50% swap fee)')

invite_q_per_friend = RATES['active_member_brought'] + NEWCOMER
check(invite_q_per_friend == 240, 'MP-D55: 160 Q inviter + 80 Q newcomer = 240 Q')
check(30_000 * invite_q_per_friend == 7_200_000 <= F(stage1) * POTS['invites_and_creators'],
      '30,000 verified Stage 1 invites (7,200,000 Q) fit cleanly inside Stage 1 invites_and_creators pot (24,000,000 Q)')

sinks = A('quit_onchain_sinks')
check(sinks['burned_quit'] + sinks['live_supply_quit'] == 1_000_000_000,
      'Verifiable burned $QUIT (62,099,349) + live $QUIT supply (937,900,651) equals 1,000,000,000 launch supply')
check(F(sinks['locked_quit'], sinks['live_supply_quit']) > F(11, 100),
      '105,948,500 $QUIT locked across 12 Jupiter Lock PDAs exceeds 11% of live supply')

if __name__ == '__main__':
    print('all public invariants hold')
    print(f'Supply: {N:,} Q | People share: {PEOPLE / N:.0%} | Public rounds raise up to: ${float(raised):,.0f}')
    print(f'Blended contribution margin: {CM_BLEND:.1%} (Work Exchange {wx_blend:.1%}, Creator Studio {margins["creator_studio"]["blended_cash_margin"]:.1%})')

Q NATION : 14-FLOOR DIRECTORY

FLOOR 14FTHE Q WHITE PAPER (UBO & SYSTEM)FLOOR 13FQ TOKENOMICS (3,000,000,000 Q)FLOOR 12FSOVEREIGN AI TRADING DESKFLOOR 11FTHE Q NATION GUIDE (PLAIN WORDS)FLOOR 10FQ NATION MASTER PLANFLOOR 09FPAPERS & ARCHIVE HUBFLOOR 08FCREATOR STUDIO & JOIN DESKFLOOR 07FFOUNDING BUILDERS (300M Q)FLOOR 06FQ NATION COUTURE & MERCH SHOPFLOOR 05F5-GAME ARCADE HALLFLOOR 04FEX-EMPLOYEES COLLECTIBLESFLOOR 03F24/7 LIVE SEND IT STAGEFLOOR 02FON-CHAIN TOKEN FACTS & LOCKSFLOOR 01FQ NATION MAIN LOBBY (/) & VAULT

Q TOKENOMICS : ALL SECTIONS (17)

1. Q and $QUIT2. Supply and the split3. The 85/15 rule4. The people's rounds5. The work pool6. MINING: holding $QUIT7. The games pot8. Builders9. The Community Treasury and THE BOARD10. Founder and team unlocks11. Profit payouts, the Q Window and the people's dividend12. Spending Q, claims and the Q Card13. Paths to a million14. The five phases15. What the model checks16. Five revenue engines, organic flywheel and verifiable $QUIT supply sinksAppendix A. The model code