Closed c4-bot-6 closed 9 months ago
raymondfam marked the issue as insufficient quality report
raymondfam marked the issue as duplicate of #951
alcueca changed the severity to 3 (High Risk)
alcueca marked the issue as not a duplicate
There's no logic flaw in batchClaiming()
or claimFees()
. The loss of funds happens only if a user has onBalanceChange()
triggered right before claiming the affected rewards.
Lines of code
https://github.com/code-423n4/2024-01-curves/blob/516aedb7b9a8d341d0d2666c23780d2bd8a9a600/contracts/FeeSplitter.sol#L73-L78 https://github.com/code-423n4/2024-01-curves/blob/516aedb7b9a8d341d0d2666c23780d2bd8a9a600/contracts/FeeSplitter.sol#L103-L117
Vulnerability details
Impact
There is loss of funds when using
batchClaiming
and function when any user sells all his CurveToken amount is 0Bug
getClaimableFees
function returns 0 amount without accounting for the accumulated holderFees when any user's CurveToken amount is 0 and due to thisbatchClaiming
function will result in holderFee loss.Proof of Concept
Here is the foundry test file
Here is the test with main logic of the exploit:
Tools Used
Foundry
Assessed type
Context