The MartenitsaMarketplace::buyMartenitsa is active during voting which allows malicious user to check the Martenitsatoken with highest number of votes and buy it which makes the MartenitsaVoting::announceWinner to always revert since the MartenitsaToken is not listed anymore or he can re-list it using MartenitsaMarketplace::listMartenitsaForSale to become the winner himself.
Malicious user can render the MartenitsaVoting::announceWinner to always revert just by buying the MartenitsaToken with highest number of votes or can re-list it to become the winner
Note: Import {console} in MartenitsaVoting.t.sol for Poc's to work effortlessly
import {console} from "forge-std/Test.sol";
Malicious user can buy the competition Martenitsatoken with highest votes to disrupt MartenitsaVoting::announceWinner
Malicious user can buy the MartenitsaToken with highest votes and re-list using MartenitsaMarketplace::listMartenitsaForSale to become the winner himself.
The issue can be mitigated by using OpenzeppelinsPausable contract module and Pausing the MartenitsaMarketplace::buyMartenitsa function from the start of voting period to the time until the winner is announced.
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.