The oracle and stale prices
Source: kadia-lending docs/specs/economic-model.md (EM) and docs/specs/lending-design.md (LD) at commit 2bb9256 (2bb92562799019fab6ac95b2576ad94197b6b14f).
Where the price comes from
Section titled “Where the price comes from”Both markets read the ERG/USD oracle pool, the same feed DexyUSD’s own bank uses (EM §4.4). The market finds the oracle’s box by its pool NFT and reads its price. The price is rounded in the protocol’s favour.
The LP market also reads the Kadia DEX ERG/USE market, for the pool’s reserves only, never as a price. It uses the reserves as they stood at the start of the block, so a donation within the same block can’t inflate an LP token’s value (EM §10.1, D29).
When the price is stale
Section titled “When the price is stale”The feed posts a new price every few blocks. Two age limits apply (EM §12, D34; launch parameters):
| Action | Allowed when the price is at most… |
|---|---|
| Borrow, remove collateral | 15 blocks old |
| Liquidate, pre-liquidate | 90 blocks old |
| Supply, withdraw, repay, add collateral | any age |
- Actions that reduce risk stay open when the price is old: repaying and adding collateral always work. Adding collateral is how you protect your loan while the feed is stalled.
- Actions that add risk stop: no new borrowing and no removing collateral.
- Liquidations keep running longer, up to 90 blocks, so loans can still be wound down through a short stall.
- Nothing needs an administrator to resume: once the feed posts again, everything reopens.
Sudden price moves
Section titled “Sudden price moves”A price can fall on exchanges before the oracle posts it. Kadia limits what anyone can borrow at an old price in two ways (EM §12.3, D35):
- The maximum LTV leaves room for one round of lag.
- A borrow cap: new borrowing in each 15-block window is limited to 5% of the pool (launch parameters).
Large, fast drops beyond that are a disclosed risk. See Risks.