Oracles
Oracles have historically been the most common attack vector for DeFi exploits. Kamino Lend has developed its own oracle infrastructure from the ground up, enabling us to build a highly sophisticated, robust oracle system that ingests prices from various oracle providers.
Multi-Price Oracle System
This system aggregates pricing from high-quality oracle sources, such as Pyth and Chainlink, continuously checking them against each other in real time.
A multi-price system allows Kamino to:
Eliminate reliance on any single data provider
Dynamically choose the freshest prices
Add self-healing properties to oracles in the case of downtime or deviation
The Multi-Price Oracle system has been double-audited by Certora and Offside Labs.
TWAP and EWMA Prices
Time Weighted Average Prices (TWAP) and Exponentially Weighted Moving Average (EWMA) prices are resistant to price manipulations because they identify the average price of an asset over time.
Since Kamino Lend uses TWAPs and EWMAs, the protocol is protected from flash loans/flash crashes, as dramatic short term price changes are rejected. Exploiting the protocol via price manipulation is thus expensive, as it requires the exploiter not only to manipulate a price, but to sustain it for some period of time relative to the existing TWAP/EWMA intervals.
Price Bands
Each stable or soft-pegged asset in Kamino Lend has a price range within which the smart contract expects the price to fall within. This is referred to as the price-band, and alongside TWAP/EWMA, also protects the protocol from flash crashes and flash-loan exploits.
For example, USD-pegged stables like USDC and USDH could have a 1% upper or lower band from $1. In this case, if the price is above $1.01, the price would be rejected. For SOL-pegged assets, price bands would be expressed relative to the SOL price.
Providers
For Kamino Vaults, Pyth and Chainlink feeds (alongside other oracle feeds) are used as a reference price to ensure the prices of the pools we deploy into are unmanipulated. These feeds are also used to ensure that the vault rebalancing mechanism swaps at fair prices during liquidity rebalancing.
For Kamino Lend, Pyth and Chainlink feeds are used to identify the relative value of the different assets borrowed or supplied into the protocol.
These feeds are critical for the security of Kamino Lend, as it ensures that loan health ratios are properly computed and refreshed.
Last updated