sherlock-audit / 2023-10-looksrare-judging

6 stars 6 forks source link

cergyk - Minting can be easily sybilled by calling from multiple addresses #52

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

cergyk

medium

Minting can be easily sybilled by calling from multiple addresses

Summary

During the public mint phase, the Infiltration contract enforces that one address should not be able to mint more than MAX_MINT_PER_ADDRESS tokens. However it is easy to circumvent this limitation by creating multiple contracts calling the mint function in one single transaction and mint an arbitrary amount of tokens.

Vulnerability Detail

We can see in the public mint function, that a limitation is enforced for the MAX_MINT_PER_ADDRESS: https://github.com/sherlock-audit/2023-10-looksrare/blob/main/contracts-infiltration/contracts/Infiltration.sol#L477-L480

However a malicious participant Alice could set up a contract to call the mint function from different child contracts. This would allow Alice to gain a significant advantage over other participants, since as one can see in the other issues reported:

Having more agents can be used to influence the game outcome especially in the later stages.

Impact

A participant can buy an arbitrarily large amount of tokens and influence the game outcome

Code Snippet

Tool used

Manual Review

Recommendation

Please consider set up a whitelisted minting

Duplicate of #24