π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 three major oracle sources:
Custom
Echelon primarily uses Pyth oracle price feeds. For assets not supported by Pyth, the protocol uses Switchboard oracles to gather price data. 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. One can view the oracle providers for each market in the prices tab.
![](https://docs.echelon.market/~gitbook/image?url=https%3A%2F%2F937373228-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F50Y882uZP2fEhbjAMSgn%252Fuploads%252FJaNjgbiQErLic9ZcXZNj%252FScreenshot%25202024-05-17%2520at%252023.37.36.png%3Falt%3Dmedia%26token%3Dc4e610bc-de77-4d12-9a8d-78ccf73165bf&width=768&dpr=4&quality=100&sign=1903eb8&sv=1)
Custom Oracles for LSTs:
Echelon allows for looping of LSTs (Liquid Staking Tokens), enabling a higher LTV (Loan-to-value) of 90% in eMode. To minimize risks, the price of LSTs is uniquely calculated through a combination of Pyth, TWAP oracles, 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 [TWAP oracle from Thalaswap] * sthAPT / thAPT [From Thala staking rate calculation]
The APT price comes from one of the safest and most advanced oracles, Pyth.
The thAPT/APT Pool (depest liquidity on Aptos).
sthAPT is calculated as thAPT + staking rewards (on-chain calculations).
The TWAP (Time-weighted average prices) oracle from Thalaswap further smooths the price over a time interval, reducing the risk of sudden depegs (i.e., high price deviations over a very short interval). Overall, this can significantly reduce the risks of liquidation from LST depegs, while also mitigating any risks of protocol bad debt.
Last updated