Oracles

Echelon’s loan origination and liquidation services rely on price feeds from external data sources, also called Oracles. To ensure proper liquidations and avoid any bad debt, Echelon relies on four major oracle sources:

  1. Custom (Thala)

Price feeds follow a tiered model. The price from the primary oracle is always preferred unless the price feed reports a stale price or detects unusual price movements, in which case the secondary serves as a backup.

Chainlink is used as primary for many assets given it has the tightest tolerance window for triggering feed updates (0.1%). Chainlink also offers:

  • heartbeat-based updates in the event prices are have moved by <0.1%

  • sub-10s latency for price updates.

Chainlink is used as primary data provider on feeds such as: APT, USDT, USDC, whWETH, xBTC, aBTC, and WBTC.

Echelon constructs remaining primary/secondary price feeds using Chainlink, Pyth, and/or Switchboard to ensure price derivation for assets onboarded on the protocol is robust and secure.

In the event that these providers go down, Echelon will switch to a temporary fallback by performing a cron job that fetches prices from DEXs and CEXs to maintain system integrity. Oracle providers for each market are displayed on the dApp.

Custom Oracles for LSTs:

Echelon allows for looping of LSTs (Liquid Staking Tokens), enabling a higher LTV of 90% in eMode. To minimize risks, the price of LSTs is uniquely calculated through a combination of Pyth prices and on-chain staking rewards calculation. For instance, the price of sthAPT for liquidation is calculated as follows:

sthAPT = APT price [From Pyth] * thAPT/APT exchange rate [from Thala staking rate calculation]

  • The APT price comes from one of the safest and most advanced oracles, Pyth.

  • sthAPT is calculated on chain as thAPT + staking rewards.

Using the exchange rate between liquid Staked Aptos helps smooth the price during periods of low liquidity, by reflecting the true value of the position in APT after the unstaking period is complete. Overall, this can significantly reduce the risks of liquidation from LST depegs, while also mitigating any risks of protocol bad debt associated with large liquidations.

Last updated