Closed howlbot-integration[bot] closed 5 months ago
koolexcrypto marked the issue as duplicate of #18
koolexcrypto changed the severity to 3 (High Risk)
koolexcrypto changed the severity to 2 (Med Risk)
koolexcrypto marked the issue as partial-50
koolexcrypto changed the severity to 3 (High Risk)
koolexcrypto marked the issue as duplicate of #33
koolexcrypto marked the issue as partial-25
Lines of code
https://github.com/code-423n4/2024-05-loop/blob/main/src/PrelaunchPoints.sol#L240-L266 https://github.com/code-423n4/2024-05-loop/blob/main/src/PrelaunchPoints.sol#L321-L324 https://github.com/code-423n4/2024-05-loop/blob/main/src/PrelaunchPoints.sol#L179-L195
Vulnerability details
Impact
When someone mistakenly deposits
ETH
to thePrelaunchPoints
contract it is supposed to be locked forever, however when theowner
callsPrelaunchPoints::convertAllETH
function allETH
balance is converted intolpETH
including the mistakenly sentETH
.Now the variable
totalSupply
only got updated insidePrelaunchPoints::_processLock
function whenETH
/WETH
was deposited. MeanwhiletotalLpETH
was set insidePrelaunchPoints::convertAllETH
method and could be a much larger value.When a user who locked
ETH
/WETH
calls thePrelaunchPoints::claim
orPrelaunchPoints::claimAndStake
functions, they receive a much larger amount oflpETH
than theETH
/WETH
they originally locked. However, users who locked any other LRTs don't receive this added benefit from the tokens which were supposed to be locked forever, and thereby giving them unfair disadvantage.Proof of Concept
Paste this in
PrelaunchPointsTest
contract insidetest/PrelaunchPoints.t.sol
file.Tools Used
Manual Review
Recommended Mitigation Steps
Instead of converting the whole balance of
PrelaunchPoints
contract, only convert the amount stored inPrelaunchPoints::totalSupply
variable tolpETH
tokens, and send the remaining ETH to the owner. This prevents giving unfair disadvantage to those who locked LRTs.Assessed type
Token-Transfer