I just reviewed the code for the price adapter [StETHtoETHSynchronicityPriceAdapter](https://github.com/bgd-labs/cl-synchronicity-price-adapter/blob/main/src/contracts/StETHtoETHSynchronicityPriceAdapter.sol)
and noticed it uses a hardcoded 1:1 exchange rate, meaning 1 stETH is always treated as 1 ETH.
If this is true, what would happen if stETH depegs, for example due to a critical failure on Lido’s side?
For wstETH, AAVE uses the getPooledEthByShares
function from the stETH contract. What happens if an attacker manipulates [getPooledEthByShares](https://github.com/bgd-labs/cl-synchronicity-price-adapter/blob/67124f2e85ad91e7e2a9d61c9343d68d20ea3fdb/src/contracts/WstETHSynchronicityPriceAdapter.sol#L64)
so that it returns a value that is too high or too low? Are there any protections, like lower and upper exchange limits?
Finally, does AAVE use the same method to determine the exchange rate for stETH/wstETH across all networks, including Layer 2s?
Thanks in advance for any insights or explanations!
1 Like
Hello @MrResearch, to answer your questions:
- Yes, the Aave protocol treats 1 stETH as 1 ETH on the “bottom” layer of the adapter, meaning that on that layer at least, Aave trusts the security of the Lido protocol. The rationale for this is that the alternative (reading the price from secondary markets of stETH/ETH) is arguably more fragile.
- The price oracle connected to the protocol to price wstETH (https://etherscan.io/address/0xe1D97bF61901B075E9626c8A2340a7De385861Ef#code) follows the CAPO model, which caps the exchange rate based on a dynamic model of growth. This protection applies to the upper direction of the price, though, and it is oriented more to protect against unexpected returns of the exchange rate from the Lido contracts, not anything related to market manipulations.
- On L2s and other networks, the model is similar to that on Ethereum, only with slight differences in the internal components of the oracle.
3 Likes
Hi bgdlabs, thank you so much for taking the time to reply to my post and for providing such a detailed and helpful answer to my (admittedly long!) questions. I really appreciate the effort you put into your response—it helped clarify a lot of things for me.