Security review
Audit
The Fun Coupons smart contracts, mainnet deployment script and keeper were reviewed line by line by Claude Opus 5. The fixes that came out of the review are covered by regression tests at the commit below.
- Reviewer
- Claude Opus 5
- Completed
- 14 September 2026
- Commit
5a3affc- Network
- Robinhood Chain
Test results
Every suite below passed on commit 5a3affc. Fork tests ran against the live Robinhood Chain pools the markets price from.
393
Smart contract tests
28 Foundry suites covering trading, liquidations, the pool, pricing, deployment and every fix from the review.
Passed
11
Invariants under fuzzing
64 randomised campaigns of 128 calls each, checking pool solvency and position accounting after every call.
Passed
20
Live-chain fork tests
Run against the real Robinhood Chain Uniswap pools, including the full mainnet deployment script.
Passed
110
Keeper tests
Position discovery, batching, error handling, alerts and transaction management for the liquidation keeper.
Passed
6
Fuzzed properties
256 random inputs each for tick maths, position accounting and the rule that a new position opens healthy.
Passed
1
End-to-end keeper run
A local chain with the full protocol deployed: the keeper liquidated four positions in one transaction and executed a take-profit.
Passed
Method
How the review was run, from reading the code to signing off the release.
Step 1
Line-by-line review
Four review passes ran in parallel, one each for trading, the liquidity pool, pricing and deployment, and the keeper.
Step 2
Proof before any fix
Each serious issue was reproduced with a failing test first, so a fix counted only once that test passed.
Step 3
Independent review of every fix
A separate reviewer checked each change against its requirements, then a final review covered the release as a whole.
Step 4
Tested against the live chain
Pricing and deployment were run on a fork of Robinhood Chain against the pools the markets use.
Scope
What the review covered, at the commit above.
| Component | What it covers | Lines |
|---|---|---|
| Smart contracts | Trading, LiquidityVault, Cushion, PriceRouter, MarketRegistry, access control and maths libraries (14 files). | 2,878 |
| Mainnet deployment | DeployMainnet.s.sol: contract wiring, market listing, seeding and ownership. | 289 |
| Liquidation keeper | The service that liquidates positions and executes take-profit and stop-loss orders (18 files). | 1,915 |
Disclaimer
This review was carried out by Claude Opus 5, an AI model made by Anthropic. It is not an audit by an independent security firm, and Anthropic does not endorse Fun Coupons. It covers the code at commit 5a3affc only; later changes are not covered.
No review can prove that code is free of bugs. Trading and depositing carry real risk of loss. Read the Risk Disclosure before you use the protocol.