Skip to content
Business logic Audit finding Intermediate

Users who have claimed before the update on the merkle tree will have no shares of the rewards afterward

Users who claimed their airdrop before the merkle root was updated to increase rewards cannot claim the additional tokens, because the contract reverts if they have already claimed. The extra reward tokens remain stuck in the contract.

0x3b Follow with osmanozdemir1 and T1MOH

Originally disclosed on Code4rena

Submitted by 0x3b, also found by osmanozdemir1 and T1MOH

Users who have claimed before an update on the merkle tree in ArcadeAirdrop are not going to be able to claim the extra rewards. The reward tokens will be left stuck in the contract, waiting for the manager to reclaim them.

Proof of Concept

Due to the nature of how ArcadeAirdrop is made and the expectation that there might be a change in the merkle tree in the near future, users will expect to be able to claim the extra rewards (if they are increased on merkle root change). However, because there is a problematic if stamen (that is inherited in ArcadeAirdrop by ArcadeMerkleRewards) users that have already claimed their rewards will have no share of the future ones.

Example:

  1. Alice and Bob both have 100 tokens set to be claimed on the Merkle tree.
  2. Alice claims their 100 tokens.
  3. The owner sees that there is a huge activity on the platform and wants to incentivize users, so they increase rewards (by changing the merkle root) to 120 tokens.
  4. Bob claims their 120 tokens
  5. Alice sees that and tries to claim the remainder of their 120 tokens (20), but the claim reverts because of this if
    function _validateWithdraw(uint256 totalGrant, bytes32[] memory merkleProof) internal {
        ...
        //@audit if the user has already claimed, he is not able to claim ever again
        if (claimed[msg.sender] != 0) revert AA_AlreadyClaimed();
        claimed[msg.sender] = totalGrant;
    }

Recommended Mitigation Steps

Change the claim implementation the way how mint in ReputationBadge is done. They have the total amount in the merkle tree and track claimed amount in a mapping.

Assessed type

DoS

141345 (lookout) commented:

Invalid if the airdrop is one time.

Admin’s mistake. If there’s a change in airdrop amount and merkle root, the user can not claim the difference.

PowVT (Arcade.xyz) confirmed


The original report as published on Code4rena, by 0x3b. 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.

How it worked

Root cause

The contract checks if the user has claimed any amount and reverts if so, instead of tracking the amount already claimed and allowing a top-up.

Impact

Users who claimed before an update cannot receive increased rewards, and the extra tokens remain stuck in the contract until the manager reclaims them.

What the attacker needed

Airdrop merkle root is updated after a user claimed; user has already claimed some tokens

How it was found

  1. Alice and Bob are each allocated 100 tokens in the merkle tree.
  2. Alice claims her 100 tokens.
  3. The owner updates the merkle root to increase rewards to 120 tokens.
  4. Bob claims his 120 tokens.
  5. Alice tries to claim the extra 20 tokens but the transaction reverts.

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.

An airdrop uses a list (merkle tree) to decide who gets tokens. If the list is updated to give more tokens, people who already claimed cannot claim the extra because the contract blocks any second claim.

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 0x3b

View all

23 more disclosed reports, best first.

More from Arcade.xyz

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.