Agreement and averaging
A settlement rate is accepted only after several checks.
1. Oracle operators submit
Registered oracle operators submit a rate for each expired contract. The protocol's oracle job runs every 5 minutes, finds contracts that have reached expiry, and submits the current rate for each.
2. The oracle contract checks each submission
| Check | Rule |
|---|---|
| Who | The operator must be registered |
| When | Only at or after the contract's expiry |
| How often | One submission per operator per contract every 5 minutes |
| Value | Above zero |
3. Agreement
Once at least 2 submissions no older than 15 minutes exist, the oracle compares them. The spread is the gap between two submissions as a share of the lower one.
Live on testnet now:
- Spread 1% or less across all recent submissions: the agreed rate is their average. It is recorded for that contract and cannot be changed.
- Spread above 1%: every submission for that contract is cleared, and operators submit again on their next run.
In the next release (built, see Upgrades):
- The oracle finds the largest group of submissions within 1% of each other. If that group reaches the quorum, the agreed rate is the average of that group, and submissions outside it are ignored.
- So one wrong submission can neither block nor reset a correct result from the others.
- Each contract's agreement is tied to its exact expiry, so a rate agreed for one contract can never be reused for another.
Example
Three operators submit 1,420.0, 1,421.4 and 1,470.0 for a USD/NGN contract.
| Live now | Next release | |
|---|---|---|
| Group within 1% | Not all three (1,470.0 is 3.5% above 1,420.0) | 1,420.0 and 1,421.4 |
| Result | All cleared; operators submit again | Agreed at 1,420.7, the average of the two; 1,470.0 is ignored |
4. The pool checks the agreed rate
Before using it, the pool checks that:
- the rate was agreed for this contract's exact expiry;
- it is between 0.5× and 2× the contract's rate at purchase.
A rate outside that band is rejected and the contract waits for a valid one.
Rules the pool enforces on its oracle
A pool refuses to settle from an oracle whose rules are weaker than: at least 2 agreeing operators, at most 1% spread, submissions no older than 15 minutes, at least 5 minutes between an operator's submissions.