claimIncentiveFor Might Lead To Loss Of Funds For CGDA Incentive
The protocol allows anyone to claim an incentive on behalf of another user using publicly available signatures. For a time-dependent incentive, an attacker can claim early for the victim, reducing the victim's reward because the payout depends on the time since the last claim.
iamnmt Follow with ke1caM and sakshamguruji
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2024-06-boost-aa-wallet-judging/issues/178
The protocol has acknowledged this issue.
Found by
iamnmt, ke1caM, sakshamguruji
Summary
The protocol has introduces a functionality to claim an incentive for other claimants , this would require data for the claim and according to the sponsor (asked in thread) -> Signatures are available publicly by way of API , so this way I can claim for someone else , it's a neat feature but for CGDA incentive can be disastrous.
Vulnerability Detail
1.) Alice completes an action and for this action the incentive was a CGDAIncentive , the off chain mechanism verifies that Alice has performed the action successfully and grants her the claim , the claim as mentioned Signatures are available publicly by way of API
2.) Alice has a valid claim now for the CGDAIncentive , but she wants to wait for some time to claim since CGDA is dependent on lastClaimTime and she wants to maximise her gains , she wants to wait for 5 more blocks.
3.) Bob comes and claims the incentive for Alice earlier ->
He does it such that Alice would get lesser incentive due to uint256 timeSinceLastClaim = block.timestamp - cgdaParams.lastClaimTime; being smaller than Alice intended and hence the rewards sent would be lesser
4.) Alice lost her incentives , she wanted to claim after 5 blocks and make maximum gains , but Bob ruined her returns.
Impact
Alice will get way lesser incentives than intended due to Bob claiming on her behalf.
Code Snippet
Tool used
Manual Review
Recommendation
Done let users cliam for other for such time dependent incentives.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the claim function allows third parties to submit a valid signature on behalf of the claimant without restricting who can trigger the claim for time-dependent incentives.
Impact
The victim could receive a significantly lower incentive than intended, resulting in a loss of funds for that user.
What the attacker needed
Victim has a valid claim signature; signatures are publicly available via API; attacker can call the claim function
The fix
The protocol should prevent users from claiming time-dependent incentives on behalf of others, for example by restricting claims to the claimant only.
How it was found
- Alice completes an action and receives a valid claim signature for a CGDA incentive.
- Alice decides to wait several blocks before claiming to maximise her reward.
- Bob obtains Alice's publicly available signature and calls the claim function for her earlier.
- Alice receives a smaller reward because the time since the last claim is shorter than she intended.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract lets people claim rewards for someone else if they have a valid signature. For one reward type, the amount you get depends on how long it has been since the last claim. An attacker can use the victim's public signature to claim early, making the victim's reward smaller.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.