Github username: --
Submission hash (on-chain): 0x957746d44ea354bc488287fb74e7ad667a71a205f08c522eec23eb90f9d4ec93
Severity: high
Description:Description
LiquidityPool contract depends on users depositing their ethers and getting eETH share tokens as a source of liquidity/funds.
When a user deposits in the LP; he will be minted eETH shares proportional to the totalSupply of the shares tokens (eETH.totalShares()) and the available ether balance of the pool (totalPooledEther).
As per the current implementation of the LiquidityPool.withdraw function: this function can be called only either by the MembershipManager contract or the WithdrawRequestNFT contract:
So if any user wants to withdraw his deposit from the liquidity pool, he must initiate the call from either of the two contracts; otherwis the withdraw function will revert with "Incorrect Caller" error message.
Attack Scenario
But it was noticed that MembershipManager and WithdrawRequestNFT contracts don't implement LiquidityPool.withdraw function for deposits withdrawal (only for fee withdrawal when unwrapping eETH) ; so there's no way for the user to withdraw his deposit.
Github username: -- Submission hash (on-chain): 0x957746d44ea354bc488287fb74e7ad667a71a205f08c522eec23eb90f9d4ec93 Severity: high
Description: Description
LiquidityPool
contract depends on users depositing their ethers and gettingeETH
share tokens as a source of liquidity/funds.When a user deposits in the LP; he will be minted
eETH
shares proportional to the totalSupply of the shares tokens (eETH.totalShares()
) and the available ether balance of the pool (totalPooledEther
).As per the current implementation of the
LiquidityPool.withdraw
function: this function can be called only either by theMembershipManager
contract or theWithdrawRequestNFT
contract:So if any user wants to withdraw his deposit from the liquidity pool, he must initiate the call from either of the two contracts; otherwis the
withdraw
function will revert with "Incorrect Caller" error message.Attack Scenario
MembershipManager
andWithdrawRequestNFT
contracts don't implementLiquidityPool.withdraw
function for deposits withdrawal (only for fee withdrawal when unwrappingeETH
) ; so there's no way for the user to withdraw his deposit.Attachments
Revised Code File LiquidityPool.withdraw function