How the oracle works
Every contract settles on one exchange rate, agreed after it expires. The oracle is how that rate is found, checked and recorded on chain, so that nobody, including BlockFinaX, can choose the rate a contract pays on.
- Market data gives the current rate: a mid-market reference rate for each currency pair, in local currency per US dollar. See Price sources.
- Each operator submits that rate for every contract that has expired, signed with its own registered key. See Operators and submission.
- The oracle contract agrees one rate once at least 2 recent submissions are within 1% of each other. The agreed rate is their average. See Agreement and averaging.
- The pool checks the agreed rate and settles the contract, paying any payout in USDC. See Expiry and settlement.
In this section
| Page | What it covers |
|---|---|
| Price sources | Where rates come from, and which rate a contract settles on |
| Operators and submission | The operators (nodes), what they submit and when |
| Agreement and averaging | How several submissions become one agreed rate |
| Rejection rules | Every check a rate must pass, and what happens when it fails |
| Expiry and settlement | Which rate counts, and how a contract settles |
| Data failures | What happens when data is missing or operators disagree |
| Reference and executable rates | Why your bank's rate can differ from the settlement rate |
| Interest-rate benchmarks | The separate oracle for interest-rate protection |
What the oracle guarantees
- A contract settles only on a rate that several operators agreed, recorded on chain for that contract's exact expiry.
- The agreed rate cannot be changed once recorded.
- The pool refuses an agreed rate that is far from the rate at purchase, and refuses an oracle configured with weaker rules than the minimums.
Developers: the contract functions are in the Pool oracle reference.