MartenitsaEvent::stopEvent does not properly reset participant status after an event concludes, leading to a situation where users who participated in a previous event are unable to join future events.
The MartenitsaEvent contract manages event participation through an array that includes all participants (participants and a mapping that facilitates the lookup of participant status (_participants). Within this contract MartenitsaEvent::stopEvent is supposed to stop the event and clear all variables that reflect user statuses that are temporary during the event. Although the participants and _participants mapping are exactly such variables, MartenitsaEvent::stopEvent does not adequately reset/clear them. At the same time, importantly, MartenitsaEvent::stopEvent does revoke participants's producer status:
The persistent participant status prevents users from re-engaging in subsequent events, effectively barring them from participation after their initial event. This issue arises because the _participants mapping, which tracks whether an address has joined an event, is not cleared after an event concludes. At the same time
This is demonstrated in the following piece of code:
Participant exclusion: Once a user joins an event, they are permanently marked as having participated and cannot join any subsequent events.
Confusion about statuses: users who have the participant status are supposed to have also the producer status, but after an event Martenitsa::stopEvent revokes/clears only the latter, not the former, leading to a status inconsistent with the protocol's intentions.
Extra computational overhead: the participants will keep growing from event to event. The piece of code in MartenitsaEvent::stopEvent that loops through this array will become increasingly computationally expensive to run:
Manual review, Foundry.
Ensure that the _participants mapping and the participants array are cleared in MartenitsaEvent::stopEvent:
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.