Skip to content
Business logic Audit finding Intermediate

Rewards can be lost

Anurag Jain Follow

Originally disclosed on Code4rena

Submitted by csanuragjain

Reward can be lost if bribeVault calls the updateRewardsMetadata on same rewardIdentifier again before user can claim his reward (since merkleRoot and proof will get updated).

Proof of Concept

  1. bribeVault calls the updateRewardsMetadata at RewardDistributor.sol#L97 using rewardIdentifier X
  2. Assume _distributions[i].proof contains merkle proof for User A
  3. User A fails to call claim function
  4. bribeVault again calls the updateRewardsMetadata at RewardDistributor.sol#L97 using rewardIdentifier X updating _distributions[i].proof which might not contain merkle proof of User A now. So User A loses his rewards

Recommended Mitigation Steps

bribeVault should only make second call to updateRewardsMetadata on same rewardIdentifier when all claimers have made their claims.

kphed (Redacted Cartel) disputed and commented:

We would only call updateRewardsMetadata again if there was an issue with the originally-set merkle root(s). The recommended mitigation steps above would block us from setting the correct merkle roots until after claimers claimed the wrong amounts.

Thanks again for participating in our contest csanuragjain, looking forward to more feedback/suggestions/comments.

Alex the Entreprenerd (judge) commented:

The finding highlights the consequences of admin privilege, in that the admin can use updateRewardsMetadata to deny claims.

While I believe the warden could have done a better job at expressing the risks involved for users, I believe the finding to be valid.


The original report as published on Code4rena, by csanuragjain. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity business logic bug in Redacted Cartel contest. Code4rena made it public on 11 May 2022. Found in the 2022-02-redacted-cartel audit contest (finding M-18).

About Business logic

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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.

More by Anurag Jain

View all

63 more disclosed reports, best first.

More from Redacted Cartel contest

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.