Snow.sol Makes Protocol UnusableThe Snow contract is an ERC20 token implementation that allows users to buy tokens at a fixed price by calling the buySnow(uint256 amount) function. Each unit of amount is intended to represent a single token.
The contract calculates the total cost at a rate of s_buyFee * amount, where s_buyFee is scaled to 18 decimals (1e18). However, the _mint function is called with the raw amount value, which results in minting a tiny fraction of a token (wei) instead of the full token unit.
Likelihood: High
Under the current logic, if a user wants to buy 1 full Snow token (which is 10**18 wei), they would need to pass amount = 10**18. The total cost would then be 1e18 * 1e18 = 1e36 wei, or 1,000,000,000,000,000,000 ETH.
This effectively makes the token impossible to purchase in any significant quantity, breaking the entire economic and staking model of the protocol.
The following PoC demonstrates that paying 1 full ETH (the price for 1 token) results in receiving only 1 wei of Snow, which is a negligible amount for an 18-decimal token.
Adjust the _mint call to scale the amount by the token's precision (18 decimals) before minting.
(Note: Ensure the earnSnow() function is also adjusted or that the Merkle tree allotment handles whole token units vs. wei consistently).
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.