Root: The Snow constructor sets s_buyFee
= _buyFee * PRECISION
without normalizing for percentage, leading to a high per-token fee;
Impact: Users pay an excessive 5 WETH per token, deterring usage or causing financial loss.
The Snow constructor accepts _buyFee
, scales it by PRECISION (10^18) to set s_buyFee
, and uses it in buySnow without adjustment, intending a fee per token.
With _buyFee = 5
, s_buyFee = 5e18 (5 WETH/token)
, likely unintended as a flat fee rather than a percentage, resulting in impractical costs.
Likelihood:
During deployment with a default or unadjusted _buyFee
value.
When users call buySnow expecting a reasonable fee.
Impact:
Imposes a high fee (5 WETH/token), reducing adoption.
Potential financial loss if users mint at this cost.
High Fee Demonstration: The test mints 2 tokens with a fee of 10 WETH, confirming the excessive s_buyFee
value.
Result: TotalMinted: 2, Total fees has been given: 10000000000000000000 (10 WETH), showing 5 WETH per token.
Normalize _buyFee
by dividing by 10000 after scaling, treating it as basis points (e.g., 500 for 5%) to set a reasonable s_buyFee
.
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.