Skip to main content

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.

  1. Market data gives the current rate: a mid-market reference rate for each currency pair, in local currency per US dollar. See Price sources.
  2. Each operator submits that rate for every contract that has expired, signed with its own registered key. See Operators and submission.
  3. 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.
  4. The pool checks the agreed rate and settles the contract, paying any payout in USDC. See Expiry and settlement.

In this section​

PageWhat it covers
Price sourcesWhere rates come from, and which rate a contract settles on
Operators and submissionThe operators (nodes), what they submit and when
Agreement and averagingHow several submissions become one agreed rate
Rejection rulesEvery check a rate must pass, and what happens when it fails
Expiry and settlementWhich rate counts, and how a contract settles
Data failuresWhat happens when data is missing or operators disagree
Reference and executable ratesWhy your bank's rate can differ from the settlement rate
Interest-rate benchmarksThe 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.