The contract assumes 18 decimals for token calculations (e.g., INITIAL_SUPPLY, mintFaucetTokens checks) without using the decimals() function. If a subclass overrides decimals() (e.g., to 6), these hardcoded values will result in incorrect token amounts, disrupting the faucet’s functionality.
Likelihood:
Occurs when the contract is extended with a different decimals() value.
Occurs during deployment or minting operations that rely on hardcoded values.
Impact:
Incorrect token amounts are minted or checked, leading to financial errors.
Disrupts the faucet’s purpose for testnet interactions.
Explanation: The PoC shows how extending the contract with a different decimals() value causes incorrect token amounts. If decimals() is overridden to return 6, the INITIAL_SUPPLY becomes much smaller than intended, affecting all token calculations.
Explanation: We update the contract to use decimals() for all token calculations, ensuring consistency with the token’s actual decimal places. This prevents errors if decimals() is overridden and maintains correct token amounts.
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.