Price States
Each market's LPOracle reports one of four states on every read. The state decides what the market's account can do and whether the market can be seized; repay and debt-free exits work in every state.
Overview
The LPOracle reports exactly one state, in increasing severity: Live, Drifting, Cached, Expired. The state is computed on every read from current feed and pool data plus a few stored timers, with no hysteresis. The borrow flag, the second-source result and the sequencer status are reported beside the state and never change it.
The LPOracle only reports. The RiskModule enforces the borrow-side and pledge gates, and LPVaultSwap enforces the liquidation gates. Each wallet has one PositionProxy and one Aave account per market, so a market's state decides whether that account can borrow and whether that market can be seized; other markets of the same wallet are unaffected.
The valuation, routes and checks behind each state are described on the price oracles page: Price Oracles.
Live
Every token has a fresh, valid primary or alternate Chainlink route and no Drifting condition holds. A market whose tokens use their alternate routes is still Live; the alternate is reported as an informational reason. The served price is the fresh price.
Live alone is not enough to borrow. A borrow also needs the second source of every token to agree, the sequencer to be ready on Base and the served price to be within its borrow age. When a second source disagrees or cannot be read, the market stays Live and pledges and liquidation continue, but borrowing and withdrawals with debt stop.
Drifting
The market is not failed, but one of these conditions holds:
| Reason | Cause | Notes |
|---|---|---|
ANY_TOKEN_DISAGREE | A token's primary and alternate routes are both fresh and differ by more than the agreement tolerance | Starts the disagreement pause; this market's seizure waits |
USD_BAND | A stable market's USD level is outside 0.90 to 1.02 | Never blocks pledges and never pauses liquidation |
CONSISTENCY_DEVIATION | The pool TWAP is further than the tolerance from the Chainlink-implied price | Blocks new pledges |
CONSISTENCY_UNAVAILABLE | The pool's observation read fails or cannot cover the window | Blocks new pledges |
PRICE_CLAMPED | The oracle price ratio lies outside the market's tick range | Blocks new pledges; the position is valued as its one-token holding |
While Drifting, the market serves the lower of the fresh price and the last accepted price; during a disagreement it serves the price built from each token's lower route, at most the accepted price. Borrowing and withdrawals with debt are blocked; top-ups, repay, fee collection and debt-free withdrawals stay open.
Cached
The market is failed: some token has no valid route, or a configuration, route, feed, pricing-module or token-decimals read failed, or the pool's reentrancy lock is held. For cachedWindow (1 hour at launch) after the first failed read, the market serves its last accepted price with its original source timestamp. Reading the same rounds again never refreshes that timestamp.
The window starts when reads actually began to fail, not at the last round and not at the first poke after the failure. For a feed that went stale, the start is computed from the feed's own timestamps: the first second after the age limit of the last of its routes to go stale.
Borrowing, withdrawals with debt, new pledges and top-ups stop. The market cannot be seized. The account's other reserves stay liquidatable, with this market at its last accepted price. A cap of 1 hour on Cached keeps one late round from turning into mass liquidation while still bounding how long a stale price is used.
Expired
After cachedWindow of Cached the market is Expired. It serves 1: one unit of 10⁻⁸ USD per whole vault token, the smallest positive price, so Aave counts the collateral as worth about zero. The value never reverts and is never 0, so Aave keeps valuing positions and repay and debt-free withdrawals keep working.
- Avana never seizes an Expired market, so the value 1 only lowers the account's health factor and never sizes a seizure.
- Avana's own valuations keep using the last accepted price: caps, the minimum pledge value and the restore amount of a rescue top-up.
- A non-GHO debt asset whose DebtOracle is Expired is served at its last accepted price raised by
debtStressRiseBps, so stale debt counts higher, never lower. - The Expired latch is set only from Chainlink source timestamps, never from a caught error, a failed configuration read or a gas shortfall.
Served Price by State
| State | Collateral price served to Aave | Non-GHO debt price served to Aave |
|---|---|---|
| Live | Fresh price | Fresh quote |
| Drifting, no disagreement | Lower of fresh and accepted | Not applicable: a DebtOracle drifts only on disagreement |
| Drifting, routes disagree | Price at each token's lower route, at most accepted | Higher of the two routes and accepted |
| Cached | Accepted price | Accepted price |
| Expired | 1 (10⁻⁸ USD) | Accepted price × (1 + stress rise) |
What Each State Allows
Repay, fee collection, debt-free withdrawal, debt-free partial removal and zero-credit release are open in every state, because none of them reads or pokes an oracle. Liquidation is gated per reserve: only the seized collateral market and the repaid debt reserve need fresh, agreeing prices. The table shows the account holding the market in each state.
| State | New pledge | Top-up | Borrow | Withdraw with debt | Repay, fees, debt-free exit | Seizure of this market |
|---|---|---|---|---|---|---|
| Live, borrow flag true | Yes | Yes | Yes | Yes | Yes | Yes, while every input is within its liquidation age |
| Live, second source disagrees or unavailable | Yes | Yes | No | No | Yes | Yes |
| Live on an alternate route past its borrow age | Yes | Yes | No | No | Yes | No, treated as Cached |
| Drifting, USD band only | Yes | Yes | No | No | Yes | Yes, while both routes of each token are fresh and agree |
| Drifting, TWAP deviation or unavailable, price clamped | No | Yes | No | No | Yes | Yes, if the Chainlink inputs are fresh |
| Drifting, routes disagree | No | Yes | No | No | Yes | No, until the routes agree or a standby switch ends the disagreement |
| Cached | No | No | No | No | Yes | No |
| Expired | No | No | No | No | Yes | No |
| Recovery grace (any state) | As the state | As the state | As the state | As the state | Yes | Only accounts below health factor 0.95 |
| Sequencer down (Base) | No for a new account | Yes, if the market's price is still fresh | No | No | Yes | No |
| Sequencer grace (Base) | No for a new account | Yes | No | No | Yes | Only accounts below health factor 0.95 |
While a market cannot be seized, the account's other reserves with fresh prices stay liquidatable, with the blocked market counted at its served price. Withdraw with debt includes partial removal with debt and repay with collateral. The full matrix, with pause states, breakers and Aave-side flags, is on the safety pages.
Disagreement Pause
The first poke that sees a token's two fresh routes disagree stores that time and emits DisagreementRecorded. From then, seizure of this market is paused for up to disagreementPauseMax (3,600 seconds at launch, never more). A short disagreement is usually one route lagging a fast move.
- If the routes still disagree after the pause, one route is wrong. The market is treated as Expired for its own seizure until a poke sees every token agree, a guardian switches the faulty slot to its standby route, or a fix executes through the timelock.
- Meanwhile the market counts at its lower routes, so the disagreement can only make the account look less healthy, and repay and top-ups stay open.
- A route change restarts the disagreement window but never clears a disagreement by itself.
- No grace window follows a disagreement, because top-ups and repay stayed open throughout.
Recovery Grace
After an outage that reached Expired, the first fresh, valid update stores the recovery time and emits GraceStarted. For graceDuration (30 minutes at launch, at most 2 hours) LPVaultSwap liquidates an account of this market only if its health factor is below graceHealthFactor (0.95 at launch, never below 0.90). After the window, every account below 1.00 is liquidatable again. Borrowers get time to repay or add collateral at the recovered price before ordinary liquidations resume.
- Each outage starts at most one grace window.
- The recovery time is reconstructed from Chainlink's own round timestamps, so an outage that began and ended between two pokes still opens a grace window, and no caller can fake one.
- When the recovering round is the first of a new Chainlink aggregator phase, the previous round is read from the previous phase's aggregator.
- The window never starts before the recovery: without usable round evidence it starts at the newest input of the fresh price, and after a standby switch at the poke that observes the switch.
Sequencer Down and Grace
On Base, the sequencer-uptime feed adds two conditions that apply on top of every price state. Ethereum has no sequencer gate.
- Down: only transactions forced in from L1 execute, on prices that may be hours old. Borrowing, withdrawals with debt, repay with collateral, new-account pledges and liquidation stop. Repay, top-ups with a fresh price, debt-free withdrawal and fee collection keep working, including through L1.
- Grace: for 3,600 seconds after the sequencer restarts, borrowing stays closed and only accounts below health factor 0.95 can be liquidated.
- An unreadable uptime feed blocks borrowing only. It never stops liquidation.
Standby Route Switch
Each listed token records a standby route that passed, at listing, every check of the slot it can replace. When a feed fails or two routes disagree, the market's seizures wait for a usable price; a normal-delay fix would take at least five days, longer than the 48-hour window caps are sized for. The standby lets a guardian end the outage in minutes without choosing an unreviewed price.
| Call | Who | Effect |
|---|---|---|
useStandbyRoute(token, slot) | Emergency Guardian or Aave Protocol Guardian at once; or the timelock at the short delay, cancellable only by the Aave governance executor | Puts the standby in the primary or alternate slot and increments the token's route version |
cancelStandbySwitch(token) | Aave governance executor, at once | Undoes a guardian's switch |
restorePriceRoute(token) | Timelock, normal delay | Restores the listed routes once the original route is healthy |
useStandbySecondSource(token) | Either guardian, at once; switching back goes through the timelock | Replaces a failing second source with its standby |
A switch writes no oracle state. Every oracle reading the token picks up the new route on its next evaluation, restarts its disagreement timer and keeps its failure timer. A switch never forces Live: the standby is subject to the same freshness, validity and agreement checks, and a stale or disagreeing standby leaves the market where it was.
Debt Price States
GHO's fixed $1 source never fails. Each non-GHO debt asset's DebtOracle has the same four states, timers, grace window and standby route as a market.
- A failing debt price blocks borrowing that asset and borrowing or withdrawing with debt on every account that holds it.
- LPVaultSwap repays that debt reserve only while its DebtOracle is Live and within its liquidation age; the account's other debt reserves can still be repaid against fresh collateral.
- During a debt-oracle grace window, LPVaultSwap applies the grace health factor to every account with debt in that asset.
Playbook P-02
P-02 covers oracle failure, staleness, disagreement and manipulation. Monitoring pages on-call when a market is Cached or Expired, when a disagreement starts (and again 30 minutes before the pause ends), and on leg and debt-feed ages.
- Identify the failing leg and route from the oracle's price state.
- If the token's standby route is fresh and agrees with the healthy route, a guardian switches the failing slot to it.
- If the standby also fails, a guardian trips the market breaker. The market's own seizures wait while keepers keep liquidating fresh reserves.
- For a failing debt feed, the same steps apply to the DebtOracle, with the debt breaker if the standby fails.
- If only a second source fails or disagrees, so borrowing stops while the price stays Live, a guardian switches to the standby second source once it agrees with the served price.
- The governance multisig prepares a permanent source as a normal-delay price-source operation.
Recovery: keepers poke until the market is Live, the grace window applies per account, the listed route is restored at the normal delay once healthy, and a manual breaker is reset once the market has been Live for one cached window.
Example: Oracle Expiry
Example values; each market's parameters are set at listing. USDT/USD has an 86,400-second heartbeat and stays fresh for 88,200 seconds. The cached window is 1 hour, the grace duration 30 minutes and the grace health factor 0.95. One whole vault token is worth $2.00.
- Both USDT routes stop publishing. 88,200 seconds after the last round, a poke finds the leg stale. The market is Cached and serves the cached $2.00; the oracle emits
FailureRecorded. - The RiskModule refuses borrows and withdrawals with debt with
PriceNotLive. LPVaultSwap refuses to seize the market withStalePrice. Repay and debt-free withdrawal continue. - After 1 hour of Cached the market is Expired and serves 1, so Aave counts the collateral as worthless while repay and exits keep working; the oracle emits
OutageExpiredLatched. Operators follow P-02 and may switch to the standby route. - The feed publishes again and the next poke accepts it, emitting
GraceStartedwith an end time 1,800 seconds after the recovery. - For 30 minutes LPVaultSwap seizes only accounts below health factor 0.95; an account at 0.97 is refused with
GraceHealthFactor. After that, every account below 1.00 can be liquidated. - A debt asset behaves the same way through its DebtOracle, except that once Expired it serves the accepted price raised by the stress rise, so debt is never undervalued.
