Price Oracles
Avana Oracle is the protocol's collateral valuation engine for LP-backed lending.
Overview
Avana Oracle is the protocol's collateral valuation engine for LP-backed lending. It is designed to price LP positions conservatively using robust external market data, deterministic position reconstruction, and stressed liquidation assumptions rather than raw AMM spot state. This architecture is intended to reduce the risk of collateral inflation, pool-state manipulation, thin-market pricing failures, and same-transaction oracle abuse.
For fungible LPs, Avana Oracle derives value from external prices and a market-consistent reconstruction of pool balances. For concentrated liquidity positions, it values the position directly by decomposing its underlying token exposure based on range, liquidity, and current price. In both cases, the protocol applies recovery haircuts to estimate the value that can realistically be realized during liquidation. Borrow power is based on this discounted collateral value, not on theoretical net asset value.
This approach allows Avana to support LP collateral with stronger risk controls than traditional lending markets. By separating mark value from recoverable value and enforcing oracle-specific safeguards across each collateral class, Avana Oracle forms the foundation for safer LP-backed credit markets.
For LP collateral, value depends on:
- The prices of the underlying assets
- The pool reserves or inventory split
- Fee accrual
- For concentrated liquidity, the current tick relative to the position range
- Whether the position is in-range or mostly one-sided
Oracle Interface: IOracle
The IOracle interface standardizes how the protocol measures LP collateral across DEX designs, while preserving the distinction between theoretical mark value, accrued fees, and protocol-held risk buffers:
function getValue(uint256 tokenId, address asset)
external view returns (
uint256 fullValue,
uint256 feeValue,
uint256 reserveValue
);This interface abstracts DEX-specific differences so the Spoke can treat ERC-20 LPs, NFT LPs, and multi-asset pools consistently while still basing borrow power on discounted, recoverable collateral treatment instead of optimistic NAV.
Multi-Layer Architecture
For LP collateral, the safe architecture is closer to a recoverable-value checklist than a single spot-price lookup:
Price underlying assets from external robust oracles
Use resilient external feeds as the primary mark for each underlying token instead of relying on raw AMM spot state.
Derive LP value conservatively
Reconstruct pool balances or decompose concentrated liquidity positions deterministically from reserves, liquidity, range, and fees.
Haircut for impermanent loss and liquidation slippage
Discount theoretical value into recoverable collateral value by assuming stressed unwind conditions rather than frictionless exits.
Cap exposure by LP family and pool depth
Apply pool-class and liquidity-depth controls so thinner or more complex collateral receives tighter borrowing limits.
Liquidate based on recoverable unwind value, not optimistic NAV
Borrow power and liquidation logic are anchored to what can realistically be realized during unwind, not the position's best-case mark value.
DEX-Specific Handling
Different LP formats expose different position-state data, but Avana Oracle uses those venue-specific inputs to reconstruct collateral and verify pricing, not to accept raw pool state at face value.
| DEX / LP Type | Oracle Source | Notes |
|---|---|---|
| Curve Stable/Stable ERC-20 LPs | External stablecoin feeds + pool-state checks + TWAP verification | External prices anchor the assets while pool balances and fee accrual determine discounted collateral value. |
| Uniswap V2 ERC-20 LPs | Chainlink + reserve reconstruction + TWAP verification | Standard LP tokens are valued from reconstructed underlying balances, with TWAP used as a manipulation-resistant cross-check. |
| Uniswap V3 NFT LPs | Chainlink + position decomposition + tick/TWAP checks | The NFT is decomposed by liquidity, active range, and current price, then haircut for recoverable liquidation value. |
| Balancer Multi-Asset LPs | Chainlink + weighted inventory reconstruction | Multi-token pools use external prices and weighted pool inventory to estimate conservative collateral value. |
| SushiSwap / Aerodrome | Chainlink + reserve reconstruction + TWAP verification | Pool-derived observations verify reconstructed value and help resist same-transaction abuse in lower-liquidity markets. |
| PancakeSwap | Chainlink + block-based TWAP verification | External prices remain the anchor while block-based observations validate position state and unwind assumptions. |
TWAP Computation by DEX
TWAPs are used as verification and manipulation-resistance inputs alongside external asset prices and deterministic position reconstruction. They help validate unwind assumptions rather than define collateral value on their own.
Uniswap V2 & SushiSwap
On-chain cumulative price data over a 1-hour window is used to verify reconstructed reserve value and reduce susceptibility to flash swaps or short-lived pool distortions.
Uniswap V3
Position-aware checks incorporate tick range, liquidity distribution, and accrued fees so the protocol can verify the decomposed token exposure of each NFT LP.
Balancer
Weighted token observations are combined with pool weights to validate multi-asset inventory splits before assigning conservative collateral value.
Curve
Stablecoin observations are used primarily to guard against stale feeds, reserve drift, and short-term anomalies while external prices remain the anchor.
Trader Joe & Aerodrome
Cumulative price observations over a 30-60 minute window help validate low-liquidity pool state and resist same-transaction manipulation during collateral checks.
Safety & Manipulation Prevention
- Deviation Thresholds
Pauses new loans or liquidations if pool-derived verification data diverges from external reference prices beyond
maxDifference. - maxPoolPriceDifference
Ensures pool-implied state remains aligned with underlying token prices, limiting instantaneous pool manipulation and same-transaction oracle abuse.
- Open Interest Caps
Cap exposure by LP family, pool depth, and collateral complexity so thinner markets receive tighter borrow limits.
- Recovery Haircuts
Discount theoretical LP value for impermanent loss, unwind slippage, and stressed liquidation assumptions before borrow power is granted.
- Oracle Sentinel
Monitors feed health and verification inputs, triggering fallback behavior when oracle data is stale, compromised, or inconsistent with position-state checks.
Configurable Oracle Parameters
Developers can configure pool-specific oracle settings for each token via setTokenConfig:
| Parameter | Description |
|---|---|
| Token | Collateral token address |
| AggregatorV3Interface | Chainlink feed for underlying token |
| maxFeedAge | Maximum acceptable age for Chainlink feed |
| Pool | Specific DEX pool (Uniswap V3, Balancer, Curve, etc.) |
| twapSeconds | Window for TWAP computation |
| Mode | Oracle operational mode (standard/fallback) |
| maxDifference | Max allowed deviation between DEX and verification price |
Summary: Avana Oracle combines external asset pricing, deterministic LP reconstruction, discounted collateral treatment, and oracle-specific safeguards to support ERC-20 and NFT LPs with stronger protection against manipulation, stale data, and optimistic unwind assumptions across hundreds of pools.