Prices and oracles
OMEGA prices ADA with Pyth and cross-checks it against two of Cardano's largest dollar pools on Minswap. If they disagree, borrowing pauses; repaying never does.
#Where prices come from
| Source | What it is | Role |
|---|---|---|
| Pyth | A signed ADA/USD price, checked on-chain by Pyth's own contract | Sets the price |
| Minswap ADA/USDCx | One of Cardano's largest ADA-to-dollar pools | Checks the price |
| Minswap ADA/USDM | A second large ADA-to-dollar pool | Checks the price |
Pyth's price is the one OMEGA uses. The pools can stop a price, but they can never set one.
#The checks
For a price to count:
- Pyth must be fresh: at most 1 minute old at launch (never more than 5 minutes).
- Every pool must be present and genuine: Minswap's own pool at Minswap's own contract, pairing ADA with that stablecoin, holding at least $50,000 between its two sides.
- The pools must agree: within 3% of each other, and each within 20% of Pyth.
If any check fails, there's no price, and anything that needs one waits until there is.
Every configured source must take part. A transaction can't leave out one it doesn't like, so nobody can pick which sources decide.
#What needs a price
| Needs a price | Never needs a price |
|---|---|
| Opening a loan, borrowing more | Repaying |
| Withdrawing ADA | Adding ADA |
| Liquidating (with its own fallbacks) | Closing a loan |
| The ADA desk's sales | Stability pool deposits and withdrawals, staking |
When it matters, each action uses the side of the price that's safer for the protocol: borrowing values your ADA cautiously, while liquidation values it generously, in your favour.
#The speed limit
The price guard records the price at most every 15 minutes and keeps the last two hours. Borrowing and withdrawing ADA are refused if the price is more than 20% away from any of those records, or if the newest record is more than 30 minutes old. A sudden spike, real or not, can't be used to borrow against.
Liquidations ignore the speed limit, so a real crash is still handled.
#If Pyth is unavailable
Liquidations must keep working, so they have fallbacks: first Pyth without the pool check, then the pools themselves, but only if they agree within 3% and each sits within 20% of the price guard's last record. When the pools are used, the high side is marked up by 5%, so leaving Pyth out can never make a liquidation easier.
#Changing sources
Price sources can be replaced through governance with 7 days' notice, but never cut below one oracle and three sources in all. OMEGA can also read Charli3 and Orcfax, so either can be added back the same way.