The mint function in the ERC20ToGenerateNftFraccion contract is public, meaning anyone can call it to mint an unlimited number of tokens for any address. This lack of access control can lead to token inflation, devaluation, and manipulation of the token's value, undermining the protocol's tokenomics.
The mint function does not enforce any access control, allowing any address to mint tokens. This can be exploited by malicious actors to mint an unlimited number of tokens, leading to severe economic consequences for the protocol.
Code Snippet:
Exploit Scenario:
Deploy the ERC20ToGenerateNftFraccion contract.
An attacker calls the mint function to mint a large number of tokens for themselves.
The attacker can now manipulate the token's value and potentially drain funds from the protocol.
Proof of Concept:
High Impact: An attacker can mint an unlimited number of tokens, leading to token inflation and devaluation.
Economic Disruption: The contract's tokenomics can be completely undermined, causing financial losses for legitimate users.
Loss of Trust: Users may lose confidence in the protocol if the token's value is manipulated
Manual Review
Foundry
Restrict the mint function to only be callable by the owner or a specific authorized address (e.g., the TokenDivider contract). Use OpenZeppelin's Ownable or AccessControl to enforce access control.
Example Implementation:
Any person can mint the ERC20 token generated in representation of the NFT
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.