Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

## H - 2: User able to mint multiple nfts

Description :

A user is able to mint multiple nfts

Impact :

Due to no limit on amount of nfts able to be minted, a user can mint a lot of nfts and stake them earning him huge amount of creds. This would be unfair to other users.

Proof of Concept :

Add the following test and it will pass:

function testMultipleMinting() public mintRapper {
vm.startPrank(user);
oneShot.mintRapper();
oneShot.mintRapper();
oneShot.mintRapper();
oneShot.approve(address(streets), 0);
oneShot.approve(address(streets), 1);
oneShot.approve(address(streets), 2);
oneShot.approve(address(streets), 3);
streets.stake(0);
streets.stake(1);
streets.stake(2);
streets.stake(3);
vm.stopPrank();
}

Recommended Mitigation

  1. Add a check if the user has already staked in Streets

  2. Limit the amount of nfts a user can mint

  3. Limit the amount of creds a user can get from staking within a limited time period i.e. max 1 token per day, etc.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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