Description
Capped Oracles are a type of price oracle designed to limit the maximum value (or growth) of an asset’s reported price to protect against manipulation or sudden volatility.
Capped Oracles set an upper bound (a “cap”) on the price that can be reported for an asset in the protocol. This mechanism helps mitigate the risk of price manipulation—especially for low-liquidity or volatile assets—which could otherwise allow users to borrow excessively or liquidate positions unfairly. By capping the price, the protocol ensures that users can’t exploit sudden, artificial price spikes to increase their borrowing power or trigger liquidations.
Venus Correlated token oracles calculate the USD price of assets strongly correlated with other assets, for example wstETH and stETH, taking into account the onchain exchange rate between the correlated assets. Specifically, Capped Oracles limit the considered growth of that exchange rate on correlated assets.
Cached Prices is a new feature integrated on the Venus oracle contracts, that reduces the gas consumed by the functions that collect and return the prices, using Transient Storage to cache the prices in the smart contract memory. This drastically reduces the needed gas when the price for one asset is requested more than one time in the same transaction (common behaviour during liquidations or complex transactions).
The deployment and configuration of the Capped Oracles and Cached Prices will be performed on several phases. It requires the upgrade of the base contracts (ResilientOracle, BoundValidator, ChainlinkOracle, BinanceOracle and RedStoneOracle).
Security and additional considerations
We applied the following security procedures for this upgrade:
Audit reports
Deployed contracts
opBNB mainnet
opBNB testnet
References