Provide Support for Capped Oracles for Enhanced Security

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).

2 Likes

Security and additional considerations

We applied the following security procedures for this upgrade:

  • Audits: Certik, Quantstamp and Fairyproof have audited the deployed code
  • VIP execution simulation: in a simulation environment, validating the new implementations are properly set on opBNB, and the asset prices doesn’t change
  • Deployment on testnet: the same upgrade has been performed on opBNB testnet, and used in the Venus Protocol testnet deployment

Audit reports

Deployed contracts

opBNB mainnet

opBNB testnet

References

2 Likes

Excellent news! We need capped oracles to enhance Venus’ security.

1 Like

Overview

Chaos Labs supports and encourages the use of Venus Capped Oracles in all the markets which include yield bearing collateral, to prevent price manipulation of the exchange rate. In light of the upcoming adoption of Capped Oracle in the Base instance, we cover the parameters for the wsuperOETHb asset in the following recommendation.

Capped Oracle Parameters

Historical yield data for wsuperOETHb show that exchange-rate growth becomes statistically smooth once returns are measured over a 7-day horizon. This behaviour stems from Origin’s dripper contract, which streams the underlying OETH yield at a near-constant rate, suppressing short-term variance in the observed APY. To translate this evidence into a conservative growth ceiling for the Capped Oracle, Chaos Labs selects the highest annualised return recorded within the last 180 days when yields are smoothed over that 7-day window and then adds the standard deviation of the 1-day yield series to accommodate transient rate spikes.

The outcome of this calculation is an Annual Growth Rate of 14.26 %.

A snapshot interval of 30 days allows the reference exchange rate to be refreshed monthly, limiting cumulative deviation from the true on-chain rate.

Finally, to prevent the oracle from capping legitimate growth in the weeks immediately following market launch, the initial snapshot gap is sized to equal one month of yield at the recommended annual growth rate, corresponding to 1.11 %.

As such, for the asset of wsuperOETHb on the Venus Base instance, we recommend the following Capped Oracle Parameters:

Parameter Value
Annual Growth Rate 14.26%
Snapshot Interval 30d
Snapshot Gap 1.11%

Disclaimer

Chaos Labs has not been compensated by any third party for publishing this recommendation.

2 Likes

Overview

In light of the upcoming adoption of Capped Oracle in the Arbitrum and ZkSync instances, we cover the parameters for the relevant assets in the following recommendation.

zkETH

Dinero’s zkETH is an LST native to the zkSync Elastic Chain, providing a way for users to earn Ethereum staking rewards on zkSync.

The exchange rate growth of zkETH reflects staking rewards earned through native Ethereum staking. These rewards primarily originate from the Ethereum Beacon Chain and can be broadly categorized as follows:

  1. Consensus Layer Rewards - These are stable and predictable, determined by protocol-defined parameters and directly linked to the total amount of staked ETH. They form the core of the staking yield and provide a relatively steady source of rewards.
  2. MEV and Execution Layer Rewards - These rewards are more volatile, less frequent, and influenced by external market conditions. They introduce short-term variance to the yield profile, contributing to occasional spikes in the APY.

zkETH’s historical yield data is analyzed using a 14 day smoothing window to reduce noise and capture a more stable representation of staking rewards. Based on the past 180 days of data, the maximum observed 14 day annualized yield is selected, and the standard deviation of the one day APY series is added.

The resulting Annual Growth Rate used for the Capped Oracle is 7.3%.

A snapshot interval of 30 days is selected, allowing the reference exchange rate to be updated monthly and minimizing the risk of prolonged deviation from the true on-chain growth rate.

To avoid prematurely capping legitimate growth immediately after deployment, we apply a snapshot gap equivalent to one month of yield at the selected annual growth rate. This corresponds to 0.44%.

As such, for zkETH, we recommend the following Capped Oracle Parameters:

Parameter Value
Annual Growth Rate 7.3%
Snapshot Interval 30d
Snapshot Gap 0.44%

weETH

The exchange rate growth of weETH reflects staking rewards earned through EtherFi’s native Ethereum staking. These rewards are sourced directly from the Ethereum Beacon Chain and primarily include:

  1. Consensus layer rewards, which are stable and predictable. These are determined by protocol defined parameters and are a direct function of the total amount of staked ETH.
  2. MEV and execution layer rewards, which are volatile, infrequent, and subject to external market dynamics. These rewards introduce short term variance and are responsible for occasional spikes in the APY.

While EtherFi enables users to opt into restaking protocols such as EigenLayer, restaking rewards are not baked into the exchange rate of weETH. As such, restaking related yields are excluded from this analysis and do not contribute to the APY considered for the Capped Oracle.

weETH’s historical yield data is analyzed using a three day smoothing window to reduce noise. Based on the past 180 days of data, the maximum observed three day annualized yield is selected, and the standard deviation of the one day APY series is added. This methodology captures the stable baseline while accounting for transient yield spikes.

The resulting Annual Growth Rate used for the Capped Oracle is 5.3%.

A snapshot interval of 30 days is selected, allowing the reference exchange rate to be updated monthly and minimizing the risk of prolonged deviation from the true on-chain growth rate.

To avoid prematurely capping legitimate growth immediately after deployment, we apply a snapshot gap equivalent to one month of yield at the selected annual growth rate. This corresponds to 0.44%.

The yield distribution of wstETH is consistent across chains. Hence, the recommended parameters can be adopted for other wstETH markets on Venus.

As such, for weETH, we recommend the following Capped Oracle Parameters:

Parameter Value
Annual Growth Rate 5.3%
Snapshot Interval 30d
Snapshot Gap 0.44%

wstETH

The exchange rate growth of wstETH is primarily influenced by staking rewards earned on the Ethereum Beacon Chain. These rewards originate from two distinct sources:

  1. Consensus layer rewards, which are stable and predictable. These are determined by protocol defined parameters and are a direct function of the total amount of staked ETH.
  2. MEV and execution layer rewards, which are volatile, infrequent, and subject to external market dynamics. These rewards introduce short term variance and are responsible for occasional spikes in the APY.

wstETH’s historical yield data is analyzed using a three day smoothing window to reduce noise introduced by sporadic MEV events. Based on the past 180 days of data, the maximum observed three day annualized yield is selected, and the standard deviation of the one day APY series is added. This methodology captures the stable baseline while accounting for transient yield spikes.

The resulting Annual Growth Rate used for the Capped Oracle is 6.7%.

A snapshot interval of 30 days is selected, allowing the reference exchange rate to be updated monthly and minimizing the risk of prolonged deviation from the true on-chain growth rate.

To avoid prematurely capping legitimate growth immediately after deployment, we apply a snapshot gap equivalent to one month of yield at the selected annual growth rate. This corresponds to 0.55%.

The yield distribution of weETH is consistent across chains. Hence, the recommended parameters can be adopted for other weETH markets on Venus.

As such, for wstETH, we recommend the following Capped Oracle Parameters:

Parameter Value
Annual Growth Rate 6.7%
Snapshot Interval 30d
Snapshot Gap 0.55%

wUSDM

The exchange rate growth of wUSDM is primarily influenced by staking rewards earned from Treasury Bond Yield.

wUSDM’s historical yield data appears fairly inconsistent, with significant periods of lack of rewards. Based on the past 180 days of data, the maximum observed three day annualized yield is selected, and the standard deviation of the one day APY series is added. This methodology captures the stable baseline while accounting for transient yield spikes.

The resulting Annual Growth Rate used for the Capped Oracle is 6.1%.

A snapshot interval of 30 days is selected, allowing the reference exchange rate to be updated monthly and minimizing the risk of prolonged deviation from the true on-chain growth rate.

To avoid prematurely capping legitimate growth immediately after deployment, we apply a snapshot gap equivalent to one month of yield at the selected annual growth rate. This corresponds to 0.49%.

As such, for wUSDM, we recommend the following Capped Oracle Parameters:

Parameter Value
Annual Growth Rate 6.1%
Snapshot Interval 30d
Snapshot Gap 0.49%

Disclaimer

Chaos Labs has not been compensated by any third party for publishing this recommendation.

1 Like

Overview

In light of the upcoming adoption of Capped Oracle in the Ethereum Chain, we cover the parameters for the relevant assets in the Core instance in the following recommendation.

sFRAX

The exchange rate growth of sFRAX reflects rewards accrued from Frax’s staking architecture, where returns are distributed through protocol revenue and partner integrations, including RWAs and Curve gauges. Rewards are typically distributed on a weekly basis, which informs the smoothing and maximum window selections for this analysis.

To accurately capture the representative yield pattern while minimizing short term noise, a 7 day smoothing window is applied to stabilize transient fluctuations and align with the weekly cadence of reward distribution. From the past 180 days of data, the maximum 30 day annualized yield is selected, to which the standard deviation of the 7 day APY series is added in order to account for variability and potential yield spikes.

The resulting Annual Growth Rate used for the Capped Oracle is 54.04%.

A snapshot interval of 30 days is selected, allowing the reference exchange rate to be updated monthly and minimizing the risk of prolonged deviation from the true on-chain growth rate.

To avoid prematurely capping legitimate growth immediately after deployment, we apply a snapshot gap equivalent to one month of yield at the selected annual growth rate. This corresponds to 4.5%.

As such, for sFRAX, we recommend the following Capped Oracle Parameters:

Parameter Value
Annual Growth Rate 54.04%
Snapshot Interval 30d
Snapshot Gap 4.5%

sUSDS

The exchange rate growth of sUSDS reflects staking rewards distributed through Sky’s stablecoin yield system, which is backed by a combination of protocol fees, liquidity deployment, and yield strategies. These rewards are typically updated with high frequency, leading to more granular observable changes in APY.

From the past 180 days of data, the maximum 7 day annualized yield is selected. To this, the standard deviation of the 1 day APY series is added to account for short term volatility and potential yield spikes.

The resulting Annual Growth Rate used for the Capped Oracle is 16.24%.

A snapshot interval of 30 days is selected, allowing the reference exchange rate to be updated monthly and minimizing the risk of prolonged deviation from the true on-chain growth rate.

To avoid prematurely capping legitimate growth immediately after deployment, we apply a snapshot gap equivalent to one month of yield at the selected annual growth rate. This corresponds to 1.35%.

As such, for sUSDS, we recommend the following Capped Oracle Parameters:

Parameter Value
Annual Growth Rate 16.24%
Snapshot Interval 30d
Snapshot Gap 1.35%

yVault Tokens

The exchange rate growth of yVault tokens reflects rewards from various yield farming strategies and is distributed through Yearn’s yield system. These rewards are typically sparse, leading to less consistent observable APY.

From the past 180 days of data, the maximum 30 day annualized yield is selected. To this, the standard deviation of the 1 day APY series is added to account for short-term volatility and potential yield spikes.

The resulting Annual Growth Rate used for the Capped Oracle of the yvVault tokens is the following:

  • yvUSDT: 11.08%.

  • yvUSDS: 22.21%

  • yvUSDC: 12.21%

  • yvETH: 5.18%

A snapshot interval of 30 days is selected, allowing the reference exchange rate to be updated monthly and minimizing the risk of prolonged deviation from the true on-chain growth rate.

To avoid prematurely capping legitimate growth immediately after deployment, we apply a snapshot gap equivalent to one month of yield at the selected annual growth rate

As such, for yVault tokens, we recommend the following Capped Oracle Parameters:

Parameter yvUSDT yvUSDS yvUSDC yvETH
Annual Growth Rate 11.08% 22.21% 12.21% 5.18%
Snapshot Interval 30d 30d 30d 30d
Snapshot Gap 0.92% 1.85% 1.07% 0.43%

LBTC/eBTC

While BTC staked within Babylon does not currently accrue any yield, given its use of the fundamental exchange rate, we recommend the adoption of the Capped Oracle with parameters designed to prevent exchange rate manipulation while not increasing the maximum price over time. This is done by setting an initial Snapshot Gap of 4%, while maintaining the Annual Growth Rate to 0%

Parameter LBTC eBTC
Annual Growth Rate 0% 0%
Snapshot Interval 30d 30d
Snapshot Gap 4% 4%

Disclaimer

Chaos Labs has not been compensated by any third party for publishing this recommendation.

2 Likes