DOCS
On this page4 sections

Play

All-in pricing, fees, and payouts

The exact integer accounting behind every funded V3 game.

Immutable V3 rule

The game fee is inside all-in

Contract-exact raw-unit accounting
A = user-selected all-in limit
S = principal (shown as B in contract-facing state diagrams)
S = floor(A × 10,000 / 10,350)
Fee = ceil(S × 350 / 10,000)
settlement = S + Fee ≤ A
Manual prize = 2 × S
Mystery prize = floor(S × 25,000 / 10,000)

A is what the user agrees to spend in USDG terms. S—also labeled B in the contract-facing state diagrams—is principal, and Fee is the refundable 3.5% fee calculated from principal. The interface must not add another 3.5% after the user selects A.

Exact examples

All-in APrincipal SFeeManual 2xMystery 2.5x
1.0000000.9661830.0338171.9323662.415457
10.0000009.6618350.33816519.32367024.154587
50.00000048.3091781.69082296.618356120.772945
100.00000096.6183573.381643193.236714241.545892
200.000000193.2367146.763285386.473428483.091785

Integer rounding may leave one smallest USDG unit below A; it can never push settlement above the signed limit. For example, the 200 USDG row settles at 199.999999 USDG, not 200.000000.

When the fee becomes revenue

Game stateFee stateRefund / VOIDRequired next action
Coin · AwaitingRandomnessF remains pending refundable Fee EscrowOnly while still AwaitingRandomness and either frozen time or block timeout is reached: refundExpired returns B + FWait for VRF, or call the qualifying timeout path
Parity · AwaitingReportF remains pending refundable Fee EscrowOnly after the inclusive report deadline, while still AwaitingReport: voidExpired returns B + FSubmit the report through the deadline, or VOID one second later
Parity Mystery · AwaitingRandomness / AwaitingReportF remains pending refundable Fee EscrowOnly after the report deadline, while still in either awaiting state: voidExpired returns B + FComplete selection/report, or call the qualifying VOID path
Coin · RandomReady / Parity · ReportReadyF is still held by the Game but the refund/VOID branch is closedNo refund or VOID: the outcome/report is frozen and these functions reject the stateAnyone must call settle; a ready result cannot be converted back into a timeout
SettledF moves to settled Fee EscrowNo refund or VOIDOnly now may anyone call flushFee exactly once
Refunded / VoidedF was returned with BB + F has already left the GameflushFee is permanently unavailable for this Bet/Ticket
  • The current rulesVersion gives Game Fee Treasury no withdraw, spend, allocate, sweep, or Reserve refill path.
  • Protocol Hook fees, V4 LP fees, price impact, slippage, and gas are separate market costs and must be shown separately when applicable.

Timeout refund and Bond compensation are separate

Frozen ticket accounting
refundRaw = B + F
additionalReserveRaw = prizeNotionalRaw - B
user timeout/VOID receipts = refundRaw from Game + additionalReserveRaw from responsible Bond

A qualifying Coin timeout or Parity VOID returns the refundable principal and fee from Game escrow. In the same terminal transaction, the responsible VRF Provider or Reporter Bond is slashed for exactly the Ticket’s frozen additionalReserveRaw. Compensation is not taken from B, is not a fee refund, and must be shown as a separate receipt/event field.

Manual
Prize is 2B, so additionalReserveRaw = B.
Mystery
Prize is floor(2.5B), so additionalReserveRaw = prizeNotionalRaw - B.
No double terminal
A refunded/voided Ticket cannot later settle; late randomness or reports cannot recreate the exposure.

Authority sources

These repository paths were used to derive this page. They link only when an explicitly configured public repository and immutable Source A commit are both available; otherwise they remain plain paths. Release addresses and live status still require an accepted manifest and finalized evidence.

  • src/v3/game/StockFlipGameV3.sol
  • src/v3/parity/PriceParityGameV3.sol
  • src/v3/treasury/GameFeeTreasuryV3.sol
  • docs/FLIP_TOKENOMICS_AND_LAUNCH_V0_2.md