X12 - Bonds will not work with stETH #72
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
Sponsor Disputed
The sponsor disputed this issue's validity
X12
Medium
Bonds will not work with stETH
Summary
stETH
rebases will get stuck inside the bond contract.Vulnerability Detail
stETH
will be one of the three (or four, including ETH) whitelisted tokens.Tokens are not kept in the Vault but are deposited into bonds. However, when
stETH
is deposited into bonds with DefaultBondModule::depost, the bond contracts won't account for rebasing tokens. Here is an example of a bond deposit/withdrawal:https://etherscan.deth.net/address/0xB56dA788Aa93Ed50F50e0d38641519FfB3C3D1Eb
As shown,
deposit
andwithdraw
functions do not account for shares but simply mint/burn the deposited amount. This means that if anstETH
rebase is triggered, the bond contract will not account for it, causing the rebase value to remain stuck inside the contract.Impact
The Vault loses out on
stETH
rebases.Code Snippet
Tool used
Manual Review
Recommendation
Use bond contracts that calculate assets based on the shares owned.
The text was updated successfully, but these errors were encountered: