In order to recive votes a Martenitza token needs to be listed for sale, but when bought, it is longer listed as such.
During the voting period of MartenitsaVoting.sol
, as only tokens listed for sale can recive votes, any user can call MartenitsaMarketplace::buyMartenitsa
function to buy said token, deliting it's tokenIdToListing[]
, therefor it can no longer recive votes, furthermore, if it has the biggest vote count, the announceWinner
function reverts. This could be used maliciously by users and producers to influence voting results.
##Proof of code
You may add this code to MartenitsaToken.t.sol
to corroborate the the vulnerability
High impact, as this disrupts the purpuse and functionality of the voting and reward system.
Manual review
In order to resolve this issue you may:
Eliminate the list.forSale
requirement for voting for Martenitsa Token.
Make a mapping of (address ownerAtBegginingOfVotingPeriod => TokenID) so that the bought of the token doesn't disrup the voting period, as well as, using said mapping to announce the winner token.
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.