FeedProjects
Developers
Settings
🎉 A new chapter begins: Boardroom has joined Agora
Learn more
protocol logo
Explore / Projects
Gearbox DAO

Proposals

Members

Information

Create Proposal

Gearbox DAO

ProposalsMembersInformation
Proposal
Back to Proposals
closedEnded 2 years ago · Snapshot (Offchain)

[GIP-154] Hardcode stETH Oracle to ETH

By 0xab02...7aa6D8

Author

Chaos Labs

Summary

Chaos Labs provides a recommendation to implement a fundamental oracle for stETH and wstETH on all deployments.

Analysis

Current Oracle Implementation in DeFi

Fundamental oracles are critical in ensuring an accurate and non-manipulative continuous valuation of correlated assets. They are defined and enabled through withdrawal mechanisms that enable users to retrieve their underlying assets, thereby implicitly achieving market price convergence with the fundamental value. Currently, the practice of hardcoding stETH to ETH mirrors the underlying practices seen on Aave for all sound correlated assets, whereby the underlying wstETH/stETH exchange rate, or the function getPooledEthByShares, effectively represents the total accrued balance realized from consensus and execution layer rewards over time, through the form of rebasing events. In the Aave wstETH price oracle contract, this “fundamental oracle” approach is clearly demonstrated.

On Aave, unlike Gearbox, collateral assets are supplied as liquidity, making them available for borrowing. This mechanism necessitates the use of wstETH instead of the rebasing stETH on Ethereum as the underlying asset, given the complexities found through potential manipulation events through deterministic rebase extraction. The reason for this is that wstETH represents a non-rebasing, wrapped version of stETH, providing a stable and predictable value necessary for borrowing and lending operations.

Lido stETH / ETH Accounting

When a Lido oracle report occurs, the token supply is adjusted algorithmically based on various factors. These include staking rewards or slashing penalties on the Beacon Chain, execution layer rewards, and fulfilled withdrawal requests. A rebase takes place when the oracle reports the beacon statistics.

In the event of a significant slashing event, the Lido protocol can activate a “bunker mode,” whereby withdrawal requests are temporarily paused until the negative consequences of the event are fully resolved. This measure leverages a socializing principle and is designed to prevent sophisticated users from taking advantage of the situation by exiting the network prematurely during adverse conditions.

As a result, during a negative Consensus Layer rebase event or an instance where there is an extreme mass slashing event or an anticipated mass slashing event involving a significant number of validators, the underlying totalPooledEther will be discounted accordingly. This discounting effectively socializes the realized loss among current stETH holders by decreasing the relative number of stETH tokens in circulation to match the new underlying totalPooledEther value.

In such scenarios, the total amount of ETH backing stETH decreases, leading to a proportional reduction in the number of stETH tokens in circulation. This ensures that stETH continues to represent the underlying ETH it backs, maintaining its fundamental value while reducing its quantity pro-rata to reflect the loss. This mechanism ensures that all holders share the impact of the negative event equally, preventing any single participant from bearing the entire burden.

For wstETH, the wrapped version of stETH, this adjustment will result in a decrease in the underlying wstETH/stETH ratio. The ratio adjustment reflects the socialized loss realized by the network, thereby acting as a fundamental oracle. The decrease in the wstETH/stETH ratio corresponds directly to the reduction in the totalPooledEther value, ensuring that wstETH continues to represent its share of the underlying stETH accurately.

Potential Risks of Hardcoding

Bunker Mode due to tail event: Given the inability to perform withdrawals during Bunker mode, stETH’s market price may trade at a discount to its underlying 1:1 represented value. When a negative rebase occurs, it can concurrently trigger a deviation in the underlying value of the cumulative stETH collateral balance. This means that similar to how fundamental oracles operate, the underlying value of the collateral will decrease immediately.

Long validator exit queue: Long validator exit queues can lead to stETH trading below its fundamental value due to the associated implied duration risk. If a liquidation event is not profitable because the market price deviation of stETH/ETH is less than the liquidation bonus, liquidation will not occur. Instead, the market must revert to a price where liquidation becomes profitable.

stETH/ETH Market Price Deviation During Selloff: The consolidation of market liquidity and the associated non-atomic withdrawal mechanism of stETH can result in market price depegs that correlate with large ETH selloffs, thereby eating into the effective liquidator incentive.

Unliquidated positions due to market price moves without triggering bunker mode will not result in bad debt however as this type of depeg is temporary and will reconverge to the backing value in time.

Mitigations

To mitigate the risks associated with such events, especially when stETH’s market-priced value falls below the liquidation threshold, security measures should be implemented. One such measure is setting the quota of w/stETH to zero when Bunker mode is activated, or the market price deviating below a specified threshold as a function of the liquidation threshold and bonus. This precaution prevents new positions from taking advantage of the hypothetical deviation in the underlying market price of stETH and its implied value on Gearbox. By doing so, the protocol can ensure that no new loans are issued against stETH during periods of market instability, thereby maintaining stability within the system.

Lido has never experienced a day of negative rebasing or entered bunker mode historically, but these tail events should be accounted for to ensure the continued solvency of Gearbox. We are currently developing a comprehensive risk methodology and simulation framework to accurately account for the effective payoff of liquidations using fundamental oracles, incorporating the specific intricacies of the Gearbox protocol.

Technical specification

It’s proposed for the oracles to be set to match the following list: stETH oracles:

  • Mainnet:
    • main: Chainlink ETH/USD
    • reserve: composite oracle that is currently used as main

wstETH oracles:

  • Mainnet:
    • main: WSTETH_ORACLE based on Lido wstETH/stETH conversion rate and Chainlink ETH/USD
    • reserve: composite oracle that is currently used as main
  • Arbitrum:
    • main: COMPOSITE_ORACLE based on Chainlink wstETH/stETH Exchange Rate and Chainlink ETH/USD
    • reserve: composite oracle that is currently used as main
  • Optimism:
    • main: COMPOSITE_ORACLE based on Chainlink wstETH/stETH Exchange Rate and Chainlink ETH/USD
    • reserve: composite oracle that is currently used as main

Transaction log

Txs log can be found here.

Mainnet: md5 checksum: 9a0fdf63e3401dca8422f994b6d411c9 Arbitrum: md5 checksum: 61a1e789b6f686a2c7bf3446b7d43263 Optimism: md5 checksum: 4a4fcd9d67e9e6bf55473a89c1e5e153

Continue Reading
Connect Wallet to Add Note
0
Votes 14
VoterCast PowerVote & Rationale
0xC4CA...43153B
71.795M

Approve

0xeEEC...3665a3
61.399M

Approve

0xAa16...056c17
40M

Approve

0xdAb4...40a38D
29.213M

Approve

0x81E8...Fd2c08
27.949M

Approve

SHOW MORE
VOTE POWER
0
Connect Wallet
Proposal Status
  • Wed August 21 2024, 03:29 pmVoting Period Starts
  • Sat August 24 2024, 03:29 pmEnd Voting Period
Current Results

1-Approve

271.973M

Quorum 271.973M/200M
DocumentationBrandingContact Us
Home
This Project is Currently Disabled

If you would like to enable it, please checkout below.

Boardroom Subscription

Sign up for an individual subscription (access all projects on the platform)

Subscribe
Enable Project

Enable the entire project for every user

Enable Project
Contact Us