Once the voting period starts and address can vote i.e call MartenitsaVoting::voteForMartenitsa
which can be exploited by a malicious user to create multiple aliases and rig voting to become winner
Any malicious user can create multiple aliases and rig voting to become winner since creating multiple wallets or smartcontracts is trivial.
Note: Please Import {console}
in MartenitsaVoting.t.sol
by adding import {console} from "forge-std/Test.sol";
at the top for the PoC's to work effortlessly.
Malicious user jack creates 50 other aliases to win the voting and claim the healthToken
Adding a requirement to the MartenitsaVoting::voteForMartenitsa
function that only users who are owners of MartenitsaToken
can vote will mitigate the issue, i can be implemented in the following manner:
Import MartenitsaToken.sol
in MartenitsaVoting.sol
import {MartenitsaToken} from "./MartenitsaToken.sol";
Create a State variable named _martenitsaToken
in MartenitsaVoting
contract
Initialize _martenitsaToken
inMartenitsaVoting::constructor
and update testsuites to use the new constructor
Now finally add the following statement to the MartenitsaVoting::voteForMartenitsa
function
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.