Smart contract audit
15 findings, none critical: 12 fixed and 3 acknowledged. Hexens verified the fixes.
Hexens, an independent security firm, reviewed the smart contracts that run ULTRAMINT markets. Here is what it found, what changed, and what the review did not cover.
Findings
What Hexens found, and what we did about it.
Fixed findings were changed in the contracts, and Hexens checked each fix. Acknowledged findings were not fully fixed: we accepted what remains of each, for the reason given under it.
- Critical0
- High1
- Medium1
- Low3
- Informational10
| ID | Finding | Severity | Status |
|---|---|---|---|
| FERM1-1 | Resolving a market during the buying window allows front-running of the outcome | High | Fixed |
| FERM1-6 | Seed provider can make risk-free underdog buys at the expense of the treasury Every winner is paid in full before the seed is refunded, so the exposure is limited to what the market keeps for the creator pool and the treasury. Fees in plain words | Medium | Acknowledged |
| FERM1-7 | Yield is shared by stake size only, so a late stake can take most of the accrued yield risk-free By design, every stake is valued at what was put in, so a vault loss and any recovery are shared by all stakes in the market, whenever they joined. Yield on positions | Low | Acknowledged |
| FERM1-11 | Base's transaction gas cap prevents ordinary buys in 32-outcome markets | Low | Fixed |
| FERM1-9 | Protocol resolver fee ignores collateral decimals | Low | Fixed |
| FERM1-16 | Parlay baskets add too much liquidity depth: each selected cell is counted, though only one can pay | Informational | Fixed |
| FERM1-2 | priceBps() is documented as the marginal price but returns the softmax probability | Informational | Fixed |
| FERM1-3 | Seeded parlays refund losing buys when the winning cell is empty | Informational | Fixed |
| FERM1-5 | Seed-cover scaling can reduce an earlier winner's payout after a later buy | Informational | Fixed |
| FERM1-8 | Seed is deposited into the yield vault, contrary to the documentation | Informational | Fixed |
| FERM1-10 | Sub-basis-point prices cap fills while charging the full stake | Informational | Fixed |
| FERM1-12 | Outstanding allowlist signature can override the owner's later direct update | Informational | Fixed |
| FERM1-13 | Unused _isScalar() function | Informational | Fixed |
| FERM1-14 | Dispute incentives weaken as the market grows The challenge bond is capped at 2,500 USDC, and it comes back if the challenge is upheld or not ruled on in time. Fees in plain words | Informational | Acknowledged |
| FERM1-15 | Misplaced NatSpec for _credit() | Informational | Fixed |
Scope
The market contracts, at one commit.
Hexens reviewed the Strata market contracts: how markets are created, priced, resolved, challenged and paid out.
MarketCoreLsLmsrMarketFactoryMarketScalarDisputeResolverAllowlist
Reviewed at
989ef62e3db320d56d34f9538c455b5f480eee5dFixes verified at
449fdaf596feaf4392101fe1ca5b0e6a38520822Running on Base
96af5bfccd3cc25be6dab80670578109295e8b10Production runs Strata 96af5bf. Its market contract code is identical
to 449fdaf; the later commits change only the account contracts. The
Strata repository is not public, so the commits are listed for reference.
Not covered by this audit
- The ULTRAMINT account contracts: the account module, guard, setup and upgrader, and the account policy.
- The release that added the fee pot, the per-market creator shares and the Market Promoter cap, as the Terms of Service state.
- Any later release of the market contracts.
An audit lowers risk. It can't remove it.
Timeline
From first review to final report.
- Audit started
- Initial report
- Revision received
- Final report
Deployed contracts
The audited contracts on Base.
The production contracts whose source is in the scope above, at the addresses the bug bounty names, on chain ID 8453. Each address opens on Basescan. MarketCore has no address of its own: it is the base every market template is built on. The other templates and contracts the bug bounty lists add source outside this scope.
| Contract | Role | Address |
|---|---|---|
| MarketFactory | Creates markets and selects the shape implementation | 0x51179033557503024263A9482A2f62B1Aa287fdc |
| DisputeResolver | Protocol dispute and bonded-resolution path | 0xe6d588B88e5117CEb75bA782b63EA9DB6f67Fb87 |
| MarketScalar | Scalar-market template | 0x62C3113E5d07d9Aaa5Af45667A1A00E3cd911193 |
| LsLmsr | Pricing library | 0xab46f8D0dD500A9818770197aA357aBFBb2A4232 |
Report a vulnerability
Found something? Tell us privately.
Email engineering@fermah.xyz and include no live secrets. The bug bounty sets out what is in scope, the testing rules and what to send.