Closed howlbot-integration[bot] closed 5 months ago
koolexcrypto marked the issue as duplicate of #6
koolexcrypto marked the issue as duplicate of #33
koolexcrypto marked the issue as partial-75
koolexcrypto changed the severity to 3 (High Risk)
Hey @koolexcrypto!
I think this issue should be treated as a 100% duplicate of #33, since for example issue #26 describes the exact same exploit scenario as this issue and was selected as a 100% duplicate of issue #33.
Hi @radeveth
The issue takes 75% credit due to the quality. For example, "staking LRT tokens during the locking period"
There is no staking of LRT tokens. It's only locking, staking is for lpETH which happens after claiming.
Lines of code
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#L240
Vulnerability details
Impact
The
PrelaunchPoints
contract allows a user to lock a very small amount of LRT tokens, and right before or during a claim, the user can transfer a large amount of ETH directly to the contract.Originally, by design, lpETH tokens should be gained only from the contract by staking LRT tokens during the locking period and then claiming them after the locking period has ended.
However, using the method described above, a user will end up avoiding uncertainty and risks associated with the staking process and being able to claim as many LRT tokens as they want even after the locking period has ended. Even though the user isn't getting those lpETH tokens for free, the user is bypassing the staking process and avoiding the risks associated with it.
Following that, the documentation also states, "
Deposits are active up to the lpETH contract and lpETHVault contract are set
" which is an invariant, that is broken here and further more confirms this finding.Example scenario
The amounts are simplified for the sake of easier understanding
Proof of Concept
The following Foundry test can be added to
test/PrelaunchPoints.t.sol
to demonstrate this finding:Run the test using this command:
forge test --match-test "test_DepositAndStakeAfterTheClaimStartDate" -vv
Tools Used
Manual Review
Recommended Mitigation Steps
Disabling the transfer of ETH directly to the contract after the locking period or disabling the transfer of ETH directly as a whole are some possible solutions.
Assessed type
ETH-Transfer