s ∈ (0, 1] chosen to target a fixed expected reward per mint.
Building Blocks
The basic mechanisms that make up the reward scaling system: Base expected drain fraction (ifs = 1):
f = BIG_BASE_BIPS/(10_000 × BIG_ODDS) + SMALL_BASE_BIPS/(10_000 × SMALL_ODDS)with defaultsf = 0.69/15 + 0.069/4 ≈ 0.06325(≈ 6.325% of balance per mint in EV whens = 1).
τ × avgPriceEMA, whereτ = TAU_BIPS/10_000 = 0.70.
B):
s = min(1, (τ × avgPriceEMA) / (B × f) ).
bigBips = s × BIG_BASE_BIPSsmallBips = s × SMALL_BASE_BIPS.
Why this works
Here’s how it all comes together to keep rewards pegged to demand, based on recent mint activity:- EV matching. Given balance
B, the expected reward next mint isEV_payout = B × s × f = min( τ × avgPriceEMA, B × f ). In the usual case whereB > (τ × avgPriceEMA)/f, the controller achievesEV_payout ≈ τ × avgPriceEMAindependent of B. - Contract balance growth in expectation. A minter pays price
P. Long-run expected drain caused by that mint is≈ τ × avgPriceEMA. So the balance drifts upward byΔB_expected ≈ P − τ × avgPriceEMA. When prices are steady so thatP ≈ avgPriceEMA, we getΔB_expected ≈ (1 − τ) × avgPriceEMA = 0.30 × avgPriceEMA. That is: ~30% of the typical mint price accumulates in the contract on each mint in expectation, despite regular randomized rewards. - Auto-stabilization under low demand. If demand softens and price declines,
avgPriceEMAfollows it down (EMA 1/8). The target EV shrinks proportionally, so the controller reduces rewards, allowing the contract balance to keep growing (or decay much more slowly) until demand returns. - Liquidity safety. When the balance is very low,
scaps at1, and EV becomesB × f— the most the system will expect to pay out. Claims themselves also scale off the current pre-claim balance, so the contract never promises what it can’t afford.
Threshold intuition
The boundary between the capped and matched regimes is atB_threshold = (τ × avgPriceEMA) / f. With defaults and avgPriceEMA = 0.001 ETH, B_threshold ≈ 0.0007 / 0.06325 ≈ 0.0111 ETH. Above ~0.011 ETH in the contract balance, the controller is in EV-matching mode.
How Rewards are calculated (hit cases)
LetB be the balance used for calculation.
- Preview during an auction (hypothetical):
- Uses
balanceAfterMint = address(this).balance + getCurrentPrice(). - Computes
(bigTotal, smallTotal)=balanceAfterMint × (scaled bips)/10_000. - Splits each win into
(minter, randomHolder, owner)shares of 50/10/10 over 70 parts:- Minter:
50/70 ≈ 71.43% - Random holder:
10/70 ≈ 14.29% - Owner:
10/70 ≈ 14.29%
- Minter:
- Uses
- At claim time (actual):
- Uses the current balance
B = address(this).balanceat the moment of claim. - Recomputes
sand bips; payout =B × (scaled bips)/10_000. - Pays the three parties and emits
RewardSent.
- Uses the current balance
B and s — but the EV at the time of mint was already accounted for by the controller logic.
Worked Numeric Example (Based on Dev Defaults)
Assume just before claim:B = 0.020 ETH, avgPriceEMA = 0.001 ETH, τ = 0.70, f ≈ 0.06325.
- Scale:
s = (0.0007) / (0.020 × 0.06325) ≈ 0.553. - Scaled bips:
bigBips ≈ 6900 × 0.553 ≈ 3815,smallBips ≈ 690 × 0.553 ≈ 381. - If Big hit: reward ≈
0.020 × 3815 / 10_000 = 0.00763 ETH.- Split:
minter ≈ 0.00545,random ≈ 0.00109,owner ≈ 0.00109.
- Split:
- If Small hit: reward ≈
0.020 × 381 / 10_000 = 0.000762 ETH. - EV check:
0.00763/15 + 0.000762/4 ≈ 0.000699 ETH ≈ τ × avgPriceEMA = 0.0007 ETH.
Economic Goals & Properties
- Bounded expected drain:
EV_payout ≤ τ × avgPriceEMA, with strict<whensis capped at1. - Pot growth: When prices are roughly steady, expected growth per mint is about
(1 − τ) × avgPriceEMA(30% with defaults). - Never-overpay: Actual rewards are fractions of current balance; if
B = 0, claims revert viapayout > 0requirement. - Demand adaptive: Lower demand → lower
avgPriceEMA→ lower target EV → slower drain. - Distribution fairness: Independent draws for Big and Small (Small only evaluated if Big misses); random holder drawn from the historical supply snapshot at mint.