Skip to content

Case Study: RedStone Oracles Propelling DeFi with Lido’s stETH Price Feed

What is Lido?

Lido takes the lead as the topmost solution for liquid staking, offering a straightforward method to earn rewards on your crypto assets. When you stake with Lido, your tokens retain liquidity, enabling you to utilize them across various DeFi applications and garner additional rewards.

Lido, as the leading liquid staking solution, not only provides a seamless method to earn rewards on your digital assets but also distinguishes itself as the largest DeFi protocol by TVL with $14.9 Billion locked as of July 2023. 

It’s noteworthy that the most widely staked asset in the protocol is ETH, which is staked for stETH. Herein lies the mechanics of the protocol: when you stake with Lido, your tokens, especially ETH, retain their liquidity, enabling you to deploy them across a spectrum of DeFi applications, all while earning additional rewards. This unique functionality has propelled Lido to its leading status in the DeFi ecosystem.

  1. Staking pool. Protocol to manage deposits, staking rewards, and withdrawals. A separate one for every supported network.
  2. st[token]. Unlike staked tokens, the Lido st[token] is freely transferable instead of locked as in the case of native staking. Lido lets users operate with staked tokens by leveraging collateral, lending, farming, and other kinds of DeFi protocols.
  3. DAO. Lido liquid protocols management entity, is responsible for picking node operators, configuring the protocol parameters and much more.
  4. Node Operators. entities that manage a secure and stable infrastructure for running validator clients for the benefit of the protocols. They’re dedicated staking providers who can ensure the safety of funds belonging to the protocol users and the correctness of validator operations.

What is stETH?

stETH is a rebaseable ERC-20 token that represents ether staked with Lido. Unlike ether that is staked while running an Ethereum validator, stETH is liquid and can be transferred, traded, or used in DeFi applications in many forms, i.e. as collateral. The total supply of stETH reflects the amount of ether deposited into the protocol combined with staking rewards, minus potential validator penalties. stETH tokens are minted upon ether deposit at a 1:1 ratio. 

Since withdrawals from the Beacon chain have been introduced on 15th May 2023, it is also possible to redeem ether by burning stETH at the same 1:1 ratio (in rare cases it won’t preserve the 1:1 ratio though).

These scenarios are typically associated with potential penalties in the Ethereum 2.0 network. For instance, if a validator behaves maliciously or fails to maintain their online status, they may be penalized by having some of their staked ETH slashed. This slashing affects the total pool of staked ETH, which in turn could impact the 1:1 ratio of stETH to ETH, as the total value of stETH could be reduced relative to ETH.

The 1:1 ratio could be also affected by the lag between real-time changes on the Beacon chain and the updates on Lido’s side. Any discrepancies might affect the exchange rate momentarily.

stETH does not strictly comply with ERC-20. The only exception is that it does not emit Transfer() on rebase as ERC-20 standard recommends.

The result of this deviation is that token balances of stETH are not typically updated in real-time in wallets or on blockchain explorers that rely on Transfer() events to track token balances. This means that after a rebase, your stETH balance might not immediately reflect the new total until a transaction involving your stETH occurs or the interface you are using updates the balance manually.

Screen from stETH feed

Why does stETH need Oracle price feed?

The stETH token necessitates the use of an Oracle price feed to accurately represent its value in the DeFi space. Due to the increasing staking rewards, the amount of stETH on holders wallet isn’t fixed but grows over time. Additionally, stETH price fluctuates, usually following ETH price. But sometimes stETH trades at a discount and sometimes at premium against ETH (depends on market risk perception and validators penalties). An external Oracle price feed, such as RedStone’s, updates the price regularly, ensuring the real-time representation of stETH’s value. This accurate representation is pivotal for DeFi protocols such as Raft, Gravita, CIAN and Aave, which rely on these feeds for a variety of financial operations including trading, lending, and yield optimization. In this context, the Oracle price feed plays a critical role in providing a transparent, efficient, and market value of stETH, enabling these DeFi platforms to securely integrate and utilize stETH.

“”RedStone is an important enabler of stETH-based DeFi expansion – as projects can integrate stETH in various consumption versions, tailored to their needs. Additionally, RedStone has the unique methodology of utilising on-chain data sources like Uniswap and Curve, which is important for many stETH users and integrators”

said Justin David Reyes, Investor and Contributor to the Lido DAO.

Implemented Solution

Implemented Solution

RedStone has implemented a custom solution which discovers and provides the price of a stETH token. In order to get the most reliable data we used information from multiple sources including DEXes (Curve, Uniswap), CEXes (Huobi, Bybit, Bitget), and aggregators (KAIKO, Coinmarketcap, Coingecko). The price data is aggregated through the median, signed and broadcasted to the Data Distribution Layer (DDL) by our nodes. Anyone can fetch the signed data from DDL and use it in smart contracts thanks to our evm-connector library.

stETH Integration Guide

The best way to integrate stETH is to use our Core model and evm-connector library which makes it super easy to fetch signed data from DDL and use it in smart contracts. All you need to do is extend your contract with our method, e.g., `MainDemoConsumerBase` which provides the functionality to verify signatures and parse prices from call data. 

The second thing you have to do is use the evm-connector library on the client side to wrap the contract instance in order to pass proper token information to call data when interacting with the contract.

The Future of Lido-RedStone Oracles Collaboration

RedStone announced an Angel Round from top Web3 builders in May 2023 where Justin (Investor and Contributor to the Lido DAO) and Jacob (Head of BD at Lido) were angel investors, demonstrating their firm belief in RedStone’s vision and technical prowess. Their involvement underlines a steadfast commitment to a symbiotic relationship, reinforcing the notion that RedStone is on a path to significantly impact the digital asset ecosystem.

RedStone’s innovative offerings span 3 models, all of which are compatible with EVM-supported Layer 1 & Layer 2 chains such as Ethereum, Polygon, Arbitrum, Optimism, Avalanche, and BNB. As ecosystems like zkSync Era, Linea, Mantle, and Scroll gain momentum, RedStone’s models are all set to extend their reach. The stETH price feed, once bridged, can be used across these platforms, paving the way for wider adoption and increased liquidity.

Moreover, RedStone is pushing boundaries by cooperating with CIAN and exploring potential collaborations with Gravita to jointly debut on the zkSync Era. This strategic move aims to maximize the utilization of RedStone’s price feeds and contribute to the scalability and interoperability of DeFi ecosystems across multiple blockchains.

Exclusive Interview with Lido Team

Our speaker was Seraphim Czecker, DeFi Expansionist at Lido.

1. Can you explain, why RedStone’s support of stETH is important for Lido?
Lido allows to stake ether without the need to have 32 ether and run the full validation set. On top of that, once users receive stETH, you can preserve the utility across DeFi by LPing it, using it as collateral etc. Here RedStone’s price feed for stETH plays a fundamental role in external protocols being able to price the token correctly as collateral or in other DeFi contexts.

2. Why do you believe that RedStone is a valuable Oracle partner?

RedStone goes the extra mile to meet protocols’ expectations towards price feeds. What I mean is that consumers of the stETH price feed can implement it in 3 dedicated models and also ask for some custom adjustments that is possible thanks to RedStone’s modular architecture. Combined with a dedicated team of builders make you guys a solid Oracle partner.

3. What are the current limitations of using stETH cross-chain? How and when do you plan to address it?

Currently, stETH is available on Ethereum, Polygon, Optimism, and Arbitrum, but that list is likely to grow in the coming months as more on more L2s and L1s seek to integrate stETH as an asset.

About RedStone

RedStone is revolutionizing the Oracles industry by implementing novel modular design and 3 tailor-made data consumption models. You can build the new generation of DeFi & Web3 protocols based on RedStone’s versatile data offering of long-tail, LP, LST, and Ecosystem-native tokens, as well as Real World Data and custom feeds.

See what such a project could look like for your protocol Twitter | Discord | Telegram