deposit4626() is used to redeem vault assets and deposit them in a superform vault. However, in _redeemShare(), there is a strict equality balance check, that, in case of stETH, will always revert.
Technical Details
Lido stETH has a know rounding down problem as stated in their docs. When trying to redeem stETH with deposit4626(), the balance check will always fail leading the function to revert.
Impact
Low. It is not possible to use deposit4626() with a stETH vault and any other token that have a similar behaviour.
Recommendation
Avoid to use strict equality and insert a tolerance in the balance check to handle the 1-2 wei corner case in the same way that is done here.
https://github.com/yAudit/superform-report/issues/2
deposit4626() is used to redeem vault assets and deposit them in a superform vault. However, in _redeemShare(), there is a strict equality balance check, that, in case of stETH, will always revert.
Technical Details
Lido stETH has a know rounding down problem as stated in their docs. When trying to redeem stETH with deposit4626(), the balance check will always fail leading the function to revert.
Impact
Low. It is not possible to use deposit4626() with a stETH vault and any other token that have a similar behaviour.
Recommendation
Avoid to use strict equality and insert a tolerance in the balance check to handle the 1-2 wei corner case in the same way that is done here.