DOCUMENTATION
ARENA in full.
A prediction market protocol on Solana. KOL outcomes, launchpad metrics, on-chain events. LMSR-priced, dynamic-b liquidity, fully autonomous. Two closed-loop flywheels mean it bootstraps and sustains itself with zero external capital.
What is ARENA
ARENA is a prediction market protocol on Solana. Trade YES/NO on KOL outcomes, memecoin metrics, and other on-chain events. Pricing is set by an LMSR market maker with dynamic b liquidity that scales with market seed. The protocol is governed by crons, not committees.
What makes ARENA different from other prediction venues isn’t the order matching — it’s the economics. Two closed-loop flywheels feed each other: $ARENA pump.fun volume funds market liquidity; prediction trade fees fund $ARENA buy-and-burn. Nobody tops up reserves. Nobody collects house rake to a personal wallet.
How it works
Pick a market, take a side. YES at $0.40 means the market thinks there’s a 40% chance the event resolves YES. Buy shares, the price rises. Sell shares, it falls. You can trade in and out at any time before the deadline.
At the deadline, the market locks. The auto-resolver pulls the outcome from its data source — Dune query, kolscan snapshot, or Pyth oracle reading. Winning shares pay 1 SOL each. Losing shares pay 0. If you bought YES at $0.40 and YES wins, each share returns 1 SOL — a 2.5× gain.
LMSR PRICING
Cost function: C(q) = b × ln(e^(qYes/b) + e^(qNo/b)) YES price: e^(qYes/b) / (e^(qYes/b) + e^(qNo/b)) Cost to buy d: C(qYes + d, qNo) - C(qYes, qNo) Where: qYes, qNo = outstanding shares of each side b = liquidity parameter (per-market, dynamic)
The b parameter controls curve smoothness. Higher b = flatter pricing, less impact per trade. Lower b = jagged curve, larger price moves. ARENA sets b = total_seed / ln(2) so escrow always covers worst-case LMSR house liability. Winners never get haircut.
The two flywheels
ARENA runs on two closed loops. They’re coupled but not circular: Loop A gives traders something to trade on; Loop B makes $ARENA scarcer (which feeds back into Loop A by encouraging more $ARENA volume on pump.fun).
LOOP A — $ARENA volume → market liquidity
pump.fun trades on $ARENA → creator fees accrue (bonding curve + PumpSwap) → cron-claim-creator (every 30 min) sweeps both vaults → SEED WALLET → cron-seed (every 5 min) distributes seed → market escrows → markets graduate pending_seed → live, deepen as funding compounds
Two crons drive Loop A. cron-claim-creator calls distribute_creator_fees to pull SOL from both creator vaults into the seed wallet — but only if adminRevoked is true, so the admin can’t re-route fees mid-claim. cron-seed runs a bootstrap pass first (fund pending_seed markets to the 0.5 SOL minimum, oldest first) and then a growth pass (deepen live markets toward tier targets).
LOOP B — prediction trades → $ARENA burn
user buys/sells YES or NO shares → 5% fee taken (4% protocol + 1% LP, or 3.5% + 0.5% creator + 1% LP) → seeders credited LP fee pro-rata, time-weighted → cron-sweep (every 15 min) moves protocol skim → TREASURY WALLET → cron-crank (every 30 min) fires when treasury > 0.5 SOL → swap SOL → $ARENA via Jupiter Ultra → 50% burned, 50% sent to LP destination → $ARENA supply drops, depth grows
cron-sweep walks every market escrow and transfers any accrued pendingSkim to the treasury wallet (rent-exempt, on-chain). cron-crank waits for the treasury balance to clear 0.5 SOL, then runs a single composite transaction: Jupiter Ultra swap → SPL burn (50%) → SPL transfer to LP destination (50%). Slippage tolerance is 1%.
WHY THIS SHAPE
ARENA needs no operator capital, no investor cap-table, no admin multisig. $ARENA’s own creator fees seed the markets. Prediction trades fund the buy/burn. The two flywheels pay for each other. The crons are dormant until $ARENA launches; once it does, the system is fully autonomous.
For traders
BETTING
POST /api/trade
{
"marketId": "...",
"wallet": "<your-pubkey>",
"side": "YES" | "NO",
"action": "buy",
"amount": 1.0, // SOL
"txSignature": "<sig>" // SystemProgram.transfer to market escrow
}You sign one transaction (transfer SOL to the per-market escrow), then POST the signature. The backend verifies the deposit on-chain, calculates shares via LMSR, and credits your balance.
SELLING
POST /api/trade
{
"marketId": "...",
"wallet": "<your-pubkey>",
"side": "YES",
"action": "sell",
"amount": 23.6 // shares
}Selling is server-mediated — no wallet interaction needed. The escrow signs the SOL payout to your wallet. Shares are deducted atomically.
FEE BREAKDOWN — 5% TOTAL
PAYOUTS
Markets resolve automatically once their deadline passes. The auto-resolver fetches the metric value, compares it against the threshold, sets the outcome, and pays winners in batches from the market escrow. With dynamic-b solvency, every winning share pays exactly 1 SOL — no haircuts.
For seeders
Seeders provide liquidity to prediction markets in exchange for a cut of all trading fees on that market. Anyone can seed any market in pending_seed or live state.
HOW LP FEES WORK
On every trade:
trade_lp_fee = trade_sol × 0.01 // 1% LP cut
for each seeder w in this market:
seeder_share = seed_wallet[w] / seed_total
accrued_lp_fees[w] += trade_lp_fee × seeder_shareDistribution is pro-rata by share, time-weighted (your share at the moment of each trade is what matters). LP fees aren’t paid mid-market — they accumulate per-seeder and pay out lump-sum at resolution alongside your principal share.
DEPOSIT FLOW
POST /api/seed
{
"marketId": "...",
"wallet": "<your-pubkey>",
"amount": 1.5,
"txSignature": "<sig>" // SOL transfer to market escrow
}Validation: market must be in pending_seed or live; the lock cutoff (final 10% of the market’s lifetime) must not have passed; tx signature must verify a SOL transfer to the market escrow. Once validated, your deposit increments seed:{id}:total and recomputes b = seed / ln(2).
THE MATH
With N SOL of total seed, the curve supports b = N / 0.693 of liquidity. Higher b = smoother prices, larger trades possible without massive impact. A 0.5 SOL market has b ≈ 0.72 (jagged); a 7 SOL market has b ≈ 10 (very smooth).
RISK
In lopsided markets, the LMSR house pays out more than the escrow holds, so seeder principal can be partially consumed. This is the quid pro quo for LP fee yield: you take the house side of the trade, you eat the house’s losses.
Concretely, at resolution the order is: (1) winning share holders paid in full; (2) creator fees paid (if user-created); (3) what remains in escrow is divided pro-rata among seeders, plus their accrued LP fees. If the market resolved cleanly down the middle, seeders typically get their principal back plus LP fees. If it resolved heavily lopsided and absorbed most of the seed, the principal share is smaller but LP fees still pay out.
RULES
For market creators
User-created markets earn the creator 0.5% of all trade volume on that market, paid at resolution. The creator address is set when the market is created and credited via creator:{wallet}:earnings on every trade.
Today most markets are auto-generated by ARENA from kolscan leaderboards and Dune queries — those are anonymous, so the creator slot collapses (no creator cut, the full 4% protocol skim applies). User-created markets are coming; the math is already wired through every trade.
FEE FLOW (USER-CREATED)
Trade fee: 5.0% Protocol: 3.5% → treasury → buy/burn $ARENA Creator: 0.5% → market creator (paid at resolution) LP: 1.0% → seeders pro-rata
Tokenomics ($ARENA)
$ARENA is not yet launched. The two flywheels are wired but dormant — both cron-claim-creator and cron-crank exit cleanly when ARENA_MINT is unset. The flag flips at token launch.
SUPPLY MECHANICS
FEEDBACK LOOPS
Deflation: every prediction trade burns supply. More volume on ARENA → more SOL in treasury → more $ARENA bought and burned. The supply curve only moves down.
LP accumulation: the other 50% deepens the PumpSwap pool. Bigger trades fill with less slippage, attracting more $ARENA volume on pump.fun, which generates more creator fees, which feeds back into Loop A.
Creator-fee feedback: $ARENA collects pump.fun creator fees. Those don’t go to a person — they go to the seed wallet, where they bootstrap the next batch of prediction markets. The token literally pays for its own product.
Verifiability
Every action on ARENA is on-chain and auditable. There is no hidden ledger, no off-chain settlement, no “trust us” on the money. The two pool wallets and every per-market escrow are public; every transfer signature is on solscan; the source of truth for balances is RPC, not Redis.
POOL WALLETS
PER-MARKET ESCROWS
Each market has its own escrow keypair, deterministically derived and AES-256-GCM encrypted in Redis. The pubkey is shown on every market page and links to solscan. Every share purchase, every sell, every sweep, every payout is a real on-chain transfer.
WALLET PROFILES
Every trader and seeder address is a clickable shortcode that opens /u/{wallet} — full position history, P&L, accrued LP fees, and a solscan link. Receipts, not screenshots.
Risks
LMSR house risk for seeders
Lopsided markets can consume principal. LP fee yield offsets this over the market's lifetime, but a single resolution can underwater a seeder if the market resolved heavily one-sided.
Smart contract / Redis state risk
ARENA is v1. Share balances and market state live in Redis with on-chain settlement at trade and resolution time. If Redis state corrupts, recovery requires replay from on-chain trade history.
Resolution oracle risk
Markets resolve from Dune queries, kolscan snapshots, or Pyth oracles. If Dune is down at resolution time, markets defer. If a kolscan snapshot is contested, the operator may need to manually intervene. Manual markets exist mainly for testing.
Cron failure modes
If a cron stops running, markets stop seeding (Loop A) or skim accumulates without burn (Loop B). Crons are idempotent and retryable; downtime delays loops but doesn't lose funds.
$ARENA price risk (post-launch)
Once launched, $ARENA trades on pump.fun → PumpSwap. Price reflects market demand. Buy-and-burn supports floor over time but doesn't guarantee any specific price.
No formal audit
The codebase has not been formally audited. Source is open. Use at your own risk.
FAQ
Do I need $ARENA to use ARENA?
No. Trade with SOL. $ARENA is the deflationary asset that captures protocol revenue, not a gating token.
What if no one seeds my favorite market?
It stays in pending_seed and isn't tradeable until total seed reaches 0.5 SOL. The seed cranker tops up pending markets first; you can also be the first seeder yourself.
Can I withdraw my seed early?
No. Seed is locked until market resolution. This is what makes the LP fee yield possible — seeders provide reliable depth, not flighty capital.
What if a market resolves badly for seeders?
You take a haircut on principal but still receive your accrued LP fees. The 1% cut on every trade means active markets generate meaningful fee yield even when LMSR ate some of the principal.
Why doesn't ARENA need any external capital?
Because the loops fund themselves. Loop A: $ARENA pump.fun trades → creator fees → seed wallet → market liquidity. Loop B: prediction trades → treasury → $ARENA buy/burn. Nobody puts capital in; the protocol sustains itself.
Where can I see my positions?
Every wallet has a profile at /u/{wallet} — share balances, P&L, accrued LP fees, deposit history, all linked to solscan.
Why is the buy/burn cranker dormant?
$ARENA hasn't launched yet. Until ARENA_MINT is set, the cranker exits cleanly without touching funds. Treasury still accumulates skim during this window — when the token launches, the buy/burn fires immediately on the accumulated balance.
Why is the claim cranker dormant?
Same gating. cron-claim-creator only fires once $ARENA exists on pump.fun and adminRevoked is true on the FeeSharingConfig.
Can I create a market?
User-created markets are wired (3.5% / 0.5% creator / 1% LP fee split) but not yet exposed in the UI. Coming next phase.
Where's the source code?
Public repo. The two flywheels live in src/app/api/cron-claim-creator, cron-seed, cron-sweep, and cron-crank. The trade route lives in src/app/api/trade. Read it.