Snowman Merkle Airdrop

AI First Flight #10
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: medium
Likelihood: high
Invalid

The Snow token are accounted in terms of 0 decimals, but the actual decimals is still 18 leading to incorrect output when querying for token

Root + Impact

The system internally accounts Snow token amounts as if they have 0 decimals, while the actual token implementation follows the standard ERC-20 format with 18 decimals.

This mismatch arises because:

  • Contract logic (or off-chain handling) treats token amounts as whole integers (e.g., 1, 10, 100)

  • However, the token contract expects values in wei-like units (1e18 precision)

As a result, values passed into or read from the contract are not scaled correctly by 10^18, leading to inconsistent interpretation of token amounts across the system.

Incorrect token balances displayed
Users querying balances will see values off by a factor of 1e18

Description

The Snow token follows the ERC-20 standard with 18 decimals, meaning all balances and transfers should be handled in base units (amount * 10^18).

However, parts of the system (contract logic and/or off-chain components) incorrectly treat token amounts as having 0 decimals, leading to a mismatch between:

  • Internal accounting units (integer-based)

  • Actual token units (18-decimal precision)

This discrepancy causes incorrect outputs when querying token balances or executing token-related operations, as values are not properly scaled between human-readable units and on-chain representation.

Recommended Mitigation

Override the decimals function from the ERC20 inherited contract on Snow contract and return 0.

+function decimals() public view override returns (uint8) {
+ return 0;
+}
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 3 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!