Description: stopEvent
function is made to removes the producer role of the participants after the event is ended. But it only remove new producers from isProducer
mapping and leaves the array producers
without changes.
Proof of Concept:
This is not a big problem as isProducer
mapping is used for access control checks in functions
and after the end of Martenitsa Event user will not be able to create or list his tokens for sale.
But it breaks MartinisaToken:getAllProducers
function and now it returns an array with wrong value as new producers are not removed
from the array after the end of event.
Proof of Code:
MartinisaToken:getAllProducers
function will return an array with wrong values as new producers are not removed
from the array producers
after the end of event.
Manual review.
I propose to refactor _addProducer
function in MartenitsaEvent
contract and remove adding new producers to producers
array or create a nested for loop to remove new producers from producers
array and added it to stopEvent
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.