Closed c4-bot-2 closed 6 months ago
It´s the intended mechanism (WETH deposits increases the ETH balance due to conversion and it´s the first audit issue which is mitigated to existing code - so it´s on purpose)
No funds lost as they can either withdraw ETH (guided by the frontend) or claim lpETH after the claimdate
@howlbot reject
Lines of code
https://github.com/code-423n4/2024-05-loop/blob/40167e469edde09969643b6808c57e25d1b9c203/src/PrelaunchPoints.sol#L133 https://github.com/code-423n4/2024-05-loop/blob/40167e469edde09969643b6808c57e25d1b9c203/src/PrelaunchPoints.sol#L157 https://github.com/code-423n4/2024-05-loop/blob/40167e469edde09969643b6808c57e25d1b9c203/src/PrelaunchPoints.sol#L172 https://github.com/code-423n4/2024-05-loop/blob/40167e469edde09969643b6808c57e25d1b9c203/src/PrelaunchPoints.sol#L191 https://github.com/code-423n4/2024-05-loop/blob/40167e469edde09969643b6808c57e25d1b9c203/src/PrelaunchPoints.sol#L274
Vulnerability details
Impact
Users can not withdraw
WETH
and users can lose their token deposits. This can cause a denial of services if users try to make a withdraw and they can't withdraw theirWETH
deposits .UserWETH
funds will be stuck in the contract forever.Proof of Concept
if a user locks their
WETH
the_processLock
function maps the user that they depositedETH
notWETH
in this line https://github.com/code-423n4/2024-05-loop/blob/40167e469edde09969643b6808c57e25d1b9c203/src/PrelaunchPoints.sol#L191balances[_receiver][ETH] += _amount
The
balances
variable will never have a user that is mapped toWETH
even if they deposited moreWETH
funds.If a user calls the
withdraw
function with theWETH
address thewithdraw
function will not Transfer any funds and revert or Transfer zero funds to the user , becausebalances
does not mapWETH
tokens even if they are depositedTools Used
manual
Recommended Mitigation Steps
change line 191 from :
balances[_receiver][ETH] += _amount
to this codebalances[_receiver][WETH] += _amount
Assessed type
Token-Transfer