The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Potential Collision on Reward index

Summary

Vulnerability Details

The reward are stored in the mapping mapping(bytes => uint256) private rewards; and the index is calculated with rewards[abi.encodePacked(user, token.symbol)];

When there are token with same symbol, the reward mapping will be messed up.

Impact

Collision on reward index can be generated, which will mess the reward records, for example, two tokens will share the same storage:

rewards[abi.encodePacked(_position.holder, asset.token.symbol)] += _portion;

Tools Used

Manual

Recommendations

Recommend reconsider the index calculation for rewards mapping, for example, using token address instead.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.