Prediction market audit
A prediction market pays out on one recorded fact: what happened. Guardian audits the code that records it, prices the bets and pays the winners, with 12 public reports for four prediction and betting market teams.
Smart contract audits for




Jupiter

Olympus
Limit Break
Dolomite
Onchain · Prediction Market Audit
What a prediction market smart contract audit covers.
- Market creation Who can create a market, how its parameters are validated, and what a hostile creator can do once creation is permissionless.
- Resolution and oracles UMA-style assertions, liveness windows, callbacks, crosschain result delivery, and what happens when the oracle never answers.
- Bonds and disputes Challenge periods, council and token-holder votes, resets and escalations, with every bond refunded or slashed exactly once.
- Admin and fallback settlement Manual and emergency resolution paths, who can call them, and whether they can settle an outcome the market’s rules never allowed.
- Settlement and payout math Winner-takes-all and scalar payouts, pari-mutuel shares, rounding direction, and whether the last claimant still gets paid.
- Outcome tokens Minting and burning complete sets, per-side caps, redemption after resolution, and positions that change hands.
- Collateral accounting Collateral held against every outcome, including invalid ones, so the market can always pay what it owes.
- Pricing: AMM, LMSR or order book Pool price ranges, cost functions, slippage on trades and liquidity exits, and order matching.
- Signed orders and parlays Nonces, deadlines and cancellation on every signature, and parlays whose every leg can resolve.
- Cancelled and invalid markets Refunds for both sides, and where bonds, rewards and fees go when the answer is Cancelled.
- Trading cutoffs and front-running resolution Trading that closes before the result is known, and no fills on a market already settled.
- LP vaults and fees Share pricing while predictions are open, deposit and withdrawal queues, utilization limits and fee accrual.
Covers binary, categorical and scalar markets, parlays and pari-mutuel betting pools, on Ethereum, L2s and other EVM chains. Resolution workers and listing backends are scoped as an Offchain Automation Pentest, run alongside.
Public findings
What prediction market security audits have found.
Each card links a finding in a public Guardian report; the Longshot card comes from its Rust services. All were resolved.
-
C-02Sapience · Critical
The liquidity vault counted any prediction sent to it as its own collateral. An attacker could mint a near-certain loser, transfer it in to inflate the share price, exit and repeat, or push utilization past 96% so the rest of the vault’s funds could no longer be used.
LP vault Read the finding C-02 in the Sapience Foil Vault and Prediction Market report
-
C-01Sapience · Critical
A taker’s signature on a prediction carried no nonce. A maker could replay it until the taker’s allowance, balance or deadline ran out, draining the taker, the vault included.
Signed orders Read the finding C-01 in the Sapience Foil Vault and Prediction Market report
-
C-01Trueo · Critical
After a council reset, a new resolver’s bond overwrote the old one in storage. Paying the old bond to the disputer then zeroed the record, and the new resolver lost theirs.
Bonds Read the finding C-01 in the Trueo Prediction Market report
-
H-02Sapience · High
Manual settlement read the pool’s spot price, so a Yes/No market could settle at 0.73 and pay winners 73%. Any dispute blocked automatic settlement whatever UMA ruled, so a losing side could dispute, wait out the delay and settle manually at a block whose pool price suited it.
Fallback settlement Read the finding H-02 in the Sapience report
-
H-03Sapience · High
Binary markets sized collateral to their lowest configured price but could settle at exactly zero. Losses beyond collateral became shared bad debt, and the last positions to settle reverted.
Payout math Read the finding H-03 in the Sapience report
-
H-04Trueo · High
Anyone could burn Yes and No tokens for collateral in any market state. On a cancelled market, holders who burned instead of withdrawing skipped bond settlement, so bonds and rewards stayed stuck.
Outcome tokens Read the finding H-04 in the Trueo Prediction Market report
-
UB-3UltiBets · High
Betting on both sides was allowed, for arbitrage. When an event was cancelled, a bettor could withdraw only one side and lost the other stake.
Cancelled markets Read the finding UB-3 in the UltiBets Protocol Review, Part 1 report
-
SQD[1-F]-3UltiBets · High
Nothing stopped a finished event from being reported twice. A malicious oracle could call reportResult again and add both sides as winners.
Result reporting Read the finding SQD[1-F]-3 in the UltiBets Protocol Review, Part 1 report
-
UB-1UltiBets · High
Anyone could place tiny bets from many addresses to grow the Yes and No bettor lists. Reporting the result then cost too much gas or exceeded the block limit, so the event could not be resolved.
Resolution liveness Read the finding UB-1 in the UltiBets Protocol Review, Part 1 report
-
H-06Sapience · High
The slippage limit on closing liquidity was measured from the position’s amounts at close time, after any price move. An attacker could sandwich the exit and the limit never triggered.
AMM pricing Read the finding H-06 in the Sapience report
-
M-01Longshot · Medium
Kalshi-backed mention markets stayed open for quotes after Kalshi had determined a result, because Longshot’s services never froze them while that result awaited finality. Users could keep trading on a known outcome.
Offchain trading cutoff Read the finding M-01 in the Longshot Protocol Review report
Onchain · How it runs
Two teams, and resolution written as code.
-
01 / Two teams
Two independent teams, one scope.
Team A pairs expert manual review with the fuzzing suite. Team B runs Helix across every corner. Each cross-checks the other.
- Expert manual review
- Competitive incentives
- Cross-checked findings
-
02 / Helix AI Auditor
Helix, the leading AI Auditor.
Hundreds of parallel agents spend billions of tokens across the entire codebase. Only human-verified findings reach the report.
- Billions of tokens
- Human-guided context
- Human-triaged findings
-
03 / Invariant fuzzing
An invariant suite around every market state.
Core safety properties become executable invariants, fuzzed across every reachable state. On a prediction market, those are its resolution and payout rules.
- A finalized market never changes status
- The market covers every redemption
- Cancelled markets cover every refund
-
04 / Offchain resolution
The workers that list and resolve markets.
Many markets open, close and resolve in backend workers that read Polymarket, Kalshi or a data feed. An Offchain Automation Pentest, run alongside the audit, reads them against the contracts and the upstream source.
- Upstream results and quarantines
- Cutoffs tied to the source’s close
- Outcome data parsed exactly
The suite stays with your code for every later change. On Trueo’s resolution contracts, 17 invariants each ran more than 50 million times. One that failed flagged a resolution proposed before the second challenge period had ended.
Published work
Prediction market and betting protocol audits.
- ReportsSapiencePrediction markets, parlays, the liquidity vault and UMA resolution, from Foil’s gas markets on.
- ReportSapience prediction marketSigned parlays and the passive liquidity vault: 2 Criticals and 3 Highs.
- ReportSapience UMA settlementBinary markets, UMA settlement and bonds bridged over LayerZero: 8 Highs.
- ReportTrueo Prediction MarketResolvers, council disputes and escalation: 1 Critical, 6 Highs and 17 invariants.
- ReportsEvery Trueo reportThe prediction market, its outcome-token order book on Uniswap v4, and staking.
- ReportLongshotRust services behind markets backed by Kalshi and Polymarket: 47 findings.
- ReportUltiBets Protocol Review, Part 1Betting pools, result reporting and payouts: 3 Criticals and 11 Highs, all resolved.
- ReportsUltiBetsSports and event betting pools on Fantom, across two reviews.
Recent incidents
Where prediction markets have failed.
Only the first was a resolution failure. Polymarket’s October loss came through a third-party script on its website, the kind of client-side attack a WebApp Pentest tests. Predict.fun’s preliminary lead is its third-party docs site.
-
$7M marketPolymarket Ukraine vote
A $7 million market on a Ukraine minerals deal resolved Yes with no deal confirmed. Users alleged a large UMA holder swung the vote, and Polymarket issued no refunds.
-
$3.9MPolymarket
A replaced third-party script used logged-in sessions to sell positions and move funds. Polymarket is returning $3.9 million, including losses during the trading pause.
-
400K USDTPredict.fun
About 400,000 USDT left users’ wallets. Predict.fun’s preliminary investigation points to its API docs site, hosted by a third party; the mechanism is unconfirmed.
“Great references, cross-checked public audit report findings with other auditors on same projects and found that Guardian had great findings”
Resource Hub
Prediction market security reading.
- GuidePrediction market manipulationSix layers where markets break, and the defense at each.
- IncidentThe Polymarket script attackHow a vendor’s replaced script sold positions from logged-in sessions.
- IncidentThe Predict.fun docs siteWhy a vendor-hosted page needs an owner and a watch.
- ExplainerGovernance attacksHow token votes get captured, for markets settled by a vote.
- ExplainerOracle manipulationSpot prices versus TWAPs, for markets that settle on a price.
- ExplainerFront-runningHow transaction order changes outcomes, and the nonce fix.
- ResearchOffchain pentest findings315 findings from DeFi backends, keepers and cloud.
- GuideChoosing an auditorWhat to check before you sign.
Questions
Prediction market audit questions
What does a prediction market audit cover?
The contracts that create, price, resolve and pay out markets: outcome tokens, bonds, disputes, vaults, fees and admin roles. Guardian scopes it from your repository and commit. Resolution workers get an Offchain Automation Pentest, and the website a WebApp Pentest, because neither runs onchain.
Can you audit markets that resolve through UMA?
Yes. Sapience asserts outcomes to UMA’s Optimistic Oracle on one chain and runs its markets on another, with bonds and results carried by LayerZero messages. Guardian’s review covered both ends, from bond deposits and withdrawal intents to the settlement callbacks.
Which invariants do you fuzz on a prediction market?
Resolution, bond and solvency rules. In Trueo’s review, “DisputorTotalBond should be equal to disputorsCount * disputerBondAmount” held under fuzzing. The market status order check, “Market status order violated”, failed, along with two resolver bond properties.
Do you review offchain resolvers?
Yes, in a separate Offchain Automation Pentest. Guardian’s Longshot Protocol Review covered its Rust services: Polymarket outcome prices were parsed as floating point, so a value just short of 1 could round to exactly 1 and pick a winner. It was rated Medium and resolved.
Do you audit betting protocols and sportsbooks?
Yes. UltiBets ran pari-mutuel betting pools on Fantom. In its Part 2 report, placeBet never updated the per-side totals, so every winner’s withdrawal divided by zero and nobody could claim. That Critical was resolved.
Does permissionless market creation change the audit?
Yes, it adds a creator who may be hostile. Trueo’s report notes that once creation opens up, anyone could create unresolvable markets and resolve them Cancelled to collect resolver fees. It recommends a creation fee; at the time, only trusted council members could create markets.
What do we get at the end?
Human-verified findings with proof-of-concept tests, a review of your fixes, and the invariant suite, which stays with your code. Where the code is still moving, the report says so: Trueo’s recommended a further independent review at a frozen commit before deployment.
Smart Contract Audit
Other engagements
- Featured · Onchain Vanguard Audit A security audit designed to protect onchain teams facing unprecedented cyber risk. Explore Vanguard
- Managed services Managed Security Dedicated response team, red team, 24/7 attack and defense across every surface you run, onchain and off. Explore Managed Security
- OnchainSmart Contract AuditTwo competing teams, Helix AI and invariant fuzzing.
- OnchainOptions and Derivatives AuditPricing, margin, expiry, rate swaps, tranches and leveraged tokens.
- OnchainAMM and DEX AuditSwap math, ticks, rounding, fees, MEV, routers and order books.
- OnchainUniswap v4 Hook AuditPermissions, callbacks, delta settlement, hook-owned liquidity and limit orders.
- OnchainYield Vault AuditERC-4626 share math, strategies, fees and withdrawal queues.
- OnchainDeFi Protocol AuditAccounting, oracles, liquidations and integrations.
- OnchainPerp DEX AuditFunding, liquidations, oracles, auto-deleveraging and keepers.
- OnchainNFT and Gaming AuditMints, royalties, ERC-404, cross-chain NFTs and game economies.
- OffchainOffchain Automation PentestKeepers, relayers, bots and the automation-to-chain boundary.
- OffchainWebApp PentestAuth, transfer flows, business logic and client-side attacks.
- OffchainOpSec AuditKeys, signers, privileged roles, and critical operations.
- Penetration testingAll pentestsEvery offchain engagement, and how Guardian runs them.
Start now