Overview
Last updated
⚠️ Important: All examples are for reference and audit has not been completed yet. Review, test, and verify before production. Thetanuts is not responsible for issues arising from this code.
OptionBook is a decentralized options order book on Base. Makers quote off-chain; takers fill on-chain.
Flow
Makers create signed orders (spreads, butterflies, condors).
Orders are aggregated and published via API.
Takers (your users) call fillOrder() on the OptionBook contract.
Options are deployed as new contracts with collateral locked.
Settlement is processed daily by Thetanuts.
Builder Key: The referrer parameter in fillOrder() tags positions created via your platform—use it to display only “your” positions and track referral fees.
Fetch orders from API (dev/test) or your own indexer (prod).
Execute USDC-collateral trades with fillOrder().
Calculate payouts.
Fetch/filter user positions by your referrer.
This guide uses USDC for clarity. OptionBook supports other tokens (WETH and CBBTC).
Last updated

