The voteDirection() function allows users to cast votes that influence the gauge's reward distribution. However, there is no restriction on how frequently a user can change their vote, leading to a Denial-of-Service (DoS) attack where a malicious user spams votes to congest storage updates and increase gas costs, making it impractical for other users to participate.
Relevant code:
Exploit scenario:
A malicious user continuously calls voteDirection() with slightly different values (e.g., alternating between 5000 and 5001).
Each call triggers processVote(), modifying totalVotes and updating userVotes[msg.sender].
Since there is no cooldown or gas-efficient structuring, each vote forces expensive storage writes, congesting the network and making voting costly for other users.
Legitimate users are either priced out due to high gas costs or face reverted transactions due to excessive state changes.
A single malicious user can disrupt governance by inflating gas costs, making it impractical for others to vote.
Implement a cooldown period (e.g., 24 hours) per user to prevent rapid, repeated voting.
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.