We manage your security to weather the AI storm →

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.

12 Public reports for prediction and betting market teams
70+ Criticals and Highs in those reports
7 Criticals and Highs in Trueo’s resolution code
50M+ Fuzzing runs per invariant on Trueo’s prediction market

Smart contract audits for

  • GMX
  • USDT0
  • LayerZero
  • Ethena
  • Synthetix
  • Jupiter
  • Yuga Labs
  • Orderly Network
  • Olympus
  • Limit Break
  • M0
  • 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.

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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.

  1. 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
  2. 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
  3. 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
  4. 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.

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.

  1. $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.

    Mar 2025 Our coverage of the Ukraine market resolution

  2. $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.

    Oct 2026 Our breakdown of the Polymarket script attack

  3. 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.

    Oct 2026 Our breakdown of the Predict.fun incident

“Great references, cross-checked public audit report findings with other auditors on same projects and found that Guardian had great findings”
Core TeamLongshot

Resource Hub

Prediction market security reading.

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

Start now

Get a quote for your prediction market audit.

Get a quote