The stake()
function in Snow.sol
allows users to call it repeatedly without limitations or cooldown, which may lead to reward manipulation or spam.
n the Snow.sol
contract, users can call stake(uint256 amount)
as many times as they want without any restrictions or delay. There's no validation to prevent multiple calls or ensure staking is done within specific intervals.
Since there's no mechanism to track how often a user stakes or place a cap on staked tokens, a malicious actor could call this repeatedly in small increments to potentially game any reward system that is built on top of staked[msg.sender]
or totalStaked
.
Introduce one or more of the following to prevent abuse:
A cooldown between successive stakes per user
A single-entry stake system (i.e., only one active stake per user)
Capping the total amount each address can stake
Logging stake timestamps and enforcing time-based restrictions
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.