Oracle and settlement
Which price decides how an option ends, when it is read, and what happens while it is missing.
The lifecycle on the testnet
- ExpiryThe option’s expiry time passes. Filled lots now wait for a price; unfilled lots can still be cancelled.
- PriceThe first settle reads the feed’s latest report. Within 3 days of expiry it must be from no earlier than 1 hour before expiry. That price is fixed for the whole expiry.
- SettleAnyone sends settle(offerId) for each offer. On the testnet no bounty is paid.
- ClaimEach side claims what the contract holds for them, with no deadline.
Rules at a glance
Each rule in two parts: what the contracts deployed on the testnet do today, and the mainnet design, which is Planned for mainnet.
| Rule | On the testnet today | Mainnet design, planned |
|---|---|---|
| Price source | One oracle for the whole market, which the owner can change at any time; every series not yet settled follows the change. The feed is per token. On the testnet the price feed is a mock: Chainlink’s reference price is copied to it once a day, and anyone can still set it in between. | One oracle adapter per series and one feed per token, both fixed when the series opens. The feed’s decimals are checked on every read. |
| Report used | The feed’s latest report when settle runs; a report published after expiry is accepted. The first settle fixes one price per token and expiry, for every offer of that expiry. | The last report at or before expiry, proven by round. Later reports cannot be used. |
| Maximum report age | 1 hour (live: 3,600 s). The contract sets no upper bound; the owner can change it. | 1 hour by default, between 5 minutes and 24 hours. After the grace period, a report may be at most 24 hours older than expiry. |
| Grace period | 3 days after expiry (live). Within it, a report older than 1 hour before expiry is refused and settling waits. After it, the latest report is used once the price feed adapter accepts it (the TSLA feed: at most 4 days old). It is not a deadline. | 3 days by default, between 1 and 7 days. |
| Deadline | None, to settle or to claim. Nothing is lost by waiting. | The same. |
| Oracle paused | Not checked by the market or the adapter. | Settlement waits while the token reports its oracle paused (not on the 14-day escape path). |
| Escape path | None. | Fourteen days after expiry, the owner (on mainnet a 48-hour timelock) can move a series that still has no price to the market’s current oracle. It moves no funds. |
| Who can settle | Anyone, one offer at a time (settle or settleBatch). The offer’s bounty, paid by its writer when the offer was listed, goes to whoever settles it: on the testnet, 0. | The same, with the bounty capped at 5 quote tokens. |
| Fees | 1.5% of the premium at the fill, out of the writer’s premium (1.0% for buyers holding the discount token, not set on the testnet); with a referrer, 20% of that fee goes to them. A holder’s claim pays an exercise fee of 0.10% of the payoff. | The same; the exercise fee is fixed per offer when it is written. |
Which report counts today
When something goes wrong
No fresh report just after expiry
Within the 3-day grace period, a report from more than 1 hour before expiry is refused and settle reverts with StaleSettlementPrice. Anyone can retry. Once a report from after that point exists, the first settle that succeeds uses the feed’s latest report at that moment, and that price is fixed for the whole expiry.
The expiry falls on a weekend or a market holiday
The contract has no calendar. Friday’s report is too old for a later expiry, so settlement waits. Once a report from after expiry exists, for example Monday’s, the first settle that succeeds uses the feed’s latest report at that moment.
The feed stops for days
After the grace period the latest report is used only while the adapter accepts its age (the TSLA feed: 4 days). Beyond that, settle reverts with StalePrice until a new report is posted or the owner sets a new feed. Unfilled lots can still be cancelled.
The token issuer pauses TSLA
Settlement still works: it moves no TSLA. Claims that pay out in TSLA (both sides of a call) wait until the pause is lifted. If the quote token’s issuer pauses it, put claims and bounties wait instead. See Risks for the issuers’ controls.
The token issuer changes the token’s contract
The Stock Token can be upgraded by its issuer. When an option settles, the market reads the token’s multiplier, only to record it. If a new version of the token answered that read with nothing, settle would revert for every option on that token until the token is changed back or the market is replaced. Nothing is lost while it waits: the collateral stays in the contract, and claims have no deadline. See Risks for the issuer’s controls.
For developers
Settle takes an offer id; there is no series id. The preview tells you whether it would settle now, and what it would pay.
import { marketCalls, previewSettle, simulateMarketCall, sendSimulated } from "@coverline-fi/sdk";
// Settle after expiry: one offer of the series (the first settle fixes the price for the whole expiry)
const preview = await previewSettle(ctx, account, offerId);
const sim = await simulateMarketCall(ctx, account, marketCalls.settle(offerId));
await sendSimulated(wallet, sim);