Skip to main content
Source: packages/contracts/src/PredictionMarket.sol Each market is an EIP-1167 minimal-proxy clone of the implementation at 0xf348…BBe59.

Constants

State machine

bet(side)

Forwards the post-fee stake to the configured treasury (or self-custodies if treasury == 0x0). Updates yesPool / noPool notional accounting and the user’s Position.

resolve(outcome, attestationHash)

Callable only by the configured resolver (the AIResolver). Sets the outcome, recalls all liquid funds from the Treasury, and snapshots the yield split — see Yield economics.

claim()

Pulls the user’s pro-rata share of notional + bettorsYieldShare from the market balance. Tracked via totalBettorsPaid so withdrawHouse can compute the protocol’s slice without overdrawing.

withdrawHouse()

Permissionless. Computes houseAvailable = balance − (totalBettorsCommit − totalBettorsPaid) and sends to IFactoryFeeRecipient(factory).feeRecipient(). Late inflows from delayed Gimo claims roll into this bucket.

pullFromTreasury()

Permissionless. After resolve, lets a keeper (or anyone) pull matured Treasury liquidity into the market. The yield snapshot has already been taken so this only affects the protocol’s house balance, never the bettor payout.