Security & Audits

Hardened Contract Spec

Storage layout, invariants, and the exact solvency equation the contract must never break.

v1.0Last updated: 2026-10-22·2 min readSource

Verified contract

0x108D5CDC23123Fa97929Cf197151fb9dc29A5D93

Basescan-verified · solc 0.8.20 · optimizer 200 · paris

Money flow per ticket

text
F  = floor(A x 400 / 10000)        // 4% rake on the gross stake A
R  = floor(F x 3000 / 10000)       // referral cut, 30% of the rake
Ad = F - R                          // platform cut
N  = A - F                          // credited to the option pool

pool.rakeAdmin            += Ad     // escrowed per market
poolReferral[poolId][kol] += R      // escrowed per market
optionPool[poolId][opt]   += N
totalNetPool              += N

Nothing is withdrawable while a market is open. That is precisely what makes a 100% refund on cancellation arithmetically possible: the full gross stake is still sitting in the contract, untouched.

Solvency invariant

text
usdc.balanceOf(arena) >=
    SUM(pool.totalNetPool)                 // every open + settled market
  + SUM(unpaid rake escrow of open pools)
  + accumulatedAdminFees                   // released only by settle()
  + SUM(poolReferral[settled pools])       // claimable only after settle

Verified on a mainnet fork

A mixed-state run (10 markets: open, settled, cancelled) ended with balance 473.040002 USDC against 473.040000 USDC owed — a 2 wei surplus from integer rounding. Rounding always favours the contract, never the claimant.

Payout formula

text
payout = stake x totalNetPool / optionPool[winningOption]

// floor division, so SUM(payouts) <= totalNetPool always
// the residual dust (a few wei per market) is permanently locked

Access control surface

owner-onlycreatePool, seedPool, settle, cancelPool, withdrawAdminFees, setFeeVault, rescueERC20
permissionlessbet, claimRewards, claimRefund, withdrawReferralFees, emergencyRefund
never rescueablethe USDC bet token (rescueERC20 reverts for it)
owner cannot betbet() reverts OwnerCannotBet — the oracle may not take positions from the owner address

Prediction Arena

Powered by Vigilo Network

The Decentralized AI-Driven Prediction Market · Base Mainnet · USDC settled

© 2026 Prediction Arena Protocol

Risk Warning

Decentralized predictions involve market risk. Positions can lose their entire value; past performance is not indicative of future results. Nothing on this site is financial advice. Only commit funds you can afford to lose.

MIT-licensed contracts · no custodian

Community

Built by Vigilo Network

© 2026 Prediction Arena Protocol · All rights reserved.0x108D5CDC…9A5D93 · Base Mainnet 8453