Worked Examples
These examples walk through the full per-cohort and per-Power-Slot accounting for a 100-ticket game under two different fee configurations. The pool math, claimability rules, and notation are defined in the Specification.
Example A — No deposit fee
Config: e = 0.01 ETH, B_g = 7, B_v = 3, p_g = 7000, p_v = 3000,
f_bps = 0, N = 100.
Fund split
v = 0.01 * 3000 / 10000 = 0.003 ETH/ticket
g = 0.01 - 0.003 = 0.007 ETH/ticket
G = 100 * 0.007 = 0.7 ETH
V = 100 * 0.003 = 0.3 ETH
Grand prize
W = floor(log_7(100)) + 1 = 2 + 1 = 3 Power Slots
P = floor(0.7 / 3) = 0.2333... ETH per Power Slot
Power Slot IDs:
j=0: position 1 → ID 100
j=1: position 7 → ID 94
j=2: position 49 → ID 52
Dust = 0.7 - 3 * 0.2333... ≈ 0.0001 ETH
Virality cohorts
C = floor(log_3(100)) + 1 = 4 + 1 = 5 cohorts
Cohort 1: IDs 1–2 (2 members)
Cohort 2: IDs 3–8 (6 members)
Cohort 3: IDs 9–26 (18 members)
Cohort 4: IDs 27–80 (54 members)
Cohort 5: IDs 81–100 (20 members, partial — max is 162)
Pool balances
Pool[2] = 8 * 0.003 = 0.024 ETH (IDs 1–8: cohort 1→2 redirect + cohort 2)
Pool[3] = 18 * 0.003 = 0.054 ETH (IDs 9–26: cohort 3)
Pool[4] = 54 * 0.003 = 0.162 ETH (IDs 27–80: cohort 4)
Pool[5] = 20 * 0.003 = 0.060 ETH (IDs 81–100: cohort 5, partial)
Total = 0.300 ETH ✓
Team prizes
Pool[2] / 1 team = 0.024 ETH → cohort 1 CLAIMABLE (5 > 2)
Pool[3] / 2 teams = 0.027 ETH → cohorts 1, 2 CLAIMABLE (5 > 3)
Pool[4] / 3 teams = 0.054 ETH → cohorts 1, 2, 3 CLAIMABLE (5 > 4)
Pool[5] / 4 teams = 0.015 ETH → cohorts 1, 2, 3, 4 NOT CLAIMABLE (last cohort)
Per-member payouts (claimable pools only)
| Cohort | Size | Pool[2] | Pool[3] | Pool[4] | Total/member |
|---|---|---|---|---|---|
| 1 | 2 | 0.024/2 = 0.012 | 0.027/2 = 0.0135 | 0.054/2 = 0.027 | 0.0525 ETH |
| 2 | 6 | — | 0.027/6 = 0.0045 | 0.054/6 = 0.009 | 0.0135 ETH |
| 3 | 18 | — | — | 0.054/18 = 0.003 | 0.003 ETH |
Leftover (host revenue)
Pool[5] = 0.060 ETH → host claims after game ends
Full accounting
Grand prizes paid: 3 × 0.2333 = 0.6999 ETH
Virality paid (cohort 1): 2 × 0.0525 = 0.105 ETH
Virality paid (cohort 2): 6 × 0.0135 = 0.081 ETH
Virality paid (cohort 3): 18 × 0.003 = 0.054 ETH
Host leftover: 0.060 ETH
Grand prize dust: ≈0.0001 ETH
Virality rounding dust: ≈small
Total ≈ 1.000 ETH ✓
Example B — Same game, 1% deposit fee
Config: e = 0.01 ETH, B_g = 7, B_v = 3, p_g = 7000, p_v = 3000,
f_bps = 100 (1%), N = 100.
Each player still sends exactly e = 0.01 ETH per entry — the fee does
not change the price an entry costs. Aggregated over N = 100 tickets:
Total msg.value = 100 * 0.01 = 1.000 ETH ← same as the 0% fee example
effectiveValue = 1.000 ETH ← no dust refunded
feeAmount = 1.000 * 100 / 10000 = 0.010 ETH ← skimmed from entry revenue
poolContribution = 1.000 - 0.010 = 0.990 ETH ← what reaches the pools
Pool splits (reduced by fee)
v = 0.990 * 3000 / 10000 = 0.297 ETH ← virality pool total (was 0.300 at f=0)
g = 0.990 - 0.297 = 0.693 ETH ← grand prize pool total (was 0.700 at f=0)
G = 0.693 ETH
V = 0.297 ETH
W = 3 Power Slots (unchanged — fee does not change the slot count)
P = floor(0.693 / 3) ≈ 0.231 ETH per Power Slot (was ≈0.2333 at f=0)
C = 5 cohorts (unchanged)
Host revenue
Fee revenue (claimable any time): F = 0.010 ETH
Last-cohort leftover (post-game end): Pool[5] ≈ 0.0594 ETH (was 0.060 at f=0)
Total host take: ≈ 0.0694 ETH
Sanity check
Total ETH into contract = 1.000 ETH
Grand prizes paid ≈ 0.693 ETH (3 × 0.231)
Virality paid to cohorts ≈ 0.238 ETH (cohorts 1–3 from claimable pools 2–4)
Host leftover (Pool[5]) ≈ 0.0594 ETH
Host fee revenue = 0.010 ETH
Rounding dust ≈ small
Total ≈ 1.000 ETH ✓
Comparison
| Bucket | f = 0% | f = 1% |
|---|---|---|
| Players spend per entry | 0.01 ETH | 0.01 ETH |
| Grand prize pool | 0.700 ETH | 0.693 ETH |
| Total virality pool | 0.300 ETH | 0.297 ETH |
| Cohort 1 per-member payout | 0.0525 ETH | ≈0.05197 ETH |
| Host fee revenue (any time) | 0 ETH | 0.010 ETH |
| Host leftover (post-game) | 0.060 ETH | ≈0.0594 ETH |
The fee shifts 1% of the gross entry revenue (0.010 ETH) from the payout
pools to accruedDepositFees. Players pay the same 0.01 ETH per entry in
both cases; only where that ETH ends up changes.