zhuying - depositing stETH will revert beacuse the amount transfered does not equal the amount received in many cases for stETH #54
Labels
Non-Reward
This issue will not receive a payout
Sponsor Disputed
The sponsor disputed this issue's validity
zhuying
High
depositing stETH will revert beacuse the amount transfered does not equal the amount received in many cases for stETH
Summary
Depositing stETH will revert beacuse the amount transfered does not equal the amount received in many cases for stETH.
Vulnerability Detail
The process of depositing stETH is as follows:
Because the amount in step 2 is equal to the amount in step 1 and the actual amount in deposit wrapper contract is smaller than the wrap amount, depositing stETH will revert.
Impact
Depositing stETH will revert.
Code Snippet
https://github.com/sherlock-audit/2024-06-mellow/blob/main/mellow-lrt/src/utils/DepositWrapper.sol#L55-L57
https://github.com/sherlock-audit/2024-06-mellow/blob/main/mellow-lrt/src/utils/DepositWrapper.sol#L35-L39
Tool used
manual
Recommendation
The input of
_stethToWsteth
is set asIERC20(steth).balanceOf(address(this))
.Duplicate of #299
The text was updated successfully, but these errors were encountered: