Transaction reverts due to gas overflow when staking large token amounts, permanently locking user funds.
Normal Behavior: Users should be able to stake Snow tokens to receive proportional Snowman NFTs (1 NFT per 1e18 tokens)
Issue: The minting loop processes token amounts in wei (10^18 per token), causing astronomical iteration counts that always exceed block gas limits
Likelihood:
Occurs for any stake ≥0.001 tokens (1000 iterations) due to wei conversion
Affects 100% of staking transactions with non-zero amounts
Impact:
Permanent lock of transferred tokens
Complete protocol functionality denial
Irreversible loss of user funds
Explanation: Even small stakes (0.001 tokens) require 1000+ loop iterations, exceeding Ethereum's 30M gas limit since each _safeMint
consumes ~50k gas. The test verifies failure with minimal stake.
Explanation: Converts token amount to NFT count and adds cap to prevent gas exhaustion. Each iteration now represents one NFT instead of one wei.
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.