Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

users can register without sending tokens

Summary

the registration of a user is based on tokens being transferred to the contract using transferFrom, if the transfer fails silently, the registration amount for the user will still be increased

Vulnerability Details

user calls register function and these two lines are run, if transferFrom fails without reverting, the amount of the registration will still be incremented

token.transferFrom(msg.sender, address(this), amount);
// register the user
registrations[msg.sender][kind] = amount;

Impact

Users can basically steal token from the contract if the transfers during registration fail silently

Tools Used

Manual review

Recommendations

`SafeTransferFrom` covers a wider range of token behaviors and should be used here

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

[KNOWN] - Low-35 Unsafe use of transfer()/transferFrom() with IERC20

Support

FAQs

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