Beginner FriendlyFoundryGameFi
100 EXP
View results
Submission Details
Severity: medium
Valid

Participants can not sell or create Martenitsa token during event

Summary

Participants of the Martenitsa Event can not sell nor create Martenitsa token as estipulated in the documentation.

Vulnerability Details

According to the documentation, a user with healthToken can enter the MartenitsaEvent, participants during the event become producers with the capacity of creating and list for sale their owned Martenitsa tokens, but if they call MartenitsaMarketplace::listMartenitsaForSale or MartenitsaToken::createMartenitsa it reverts with the message revert: You are not a producer!.

##Proof of code
You may add this code to MartenitsaEvent.t.sol to corroborate the issue.

function testParticipantCanNotCreateOrSellMartenitsa() public activeEvent eligibleForReward{
//User joins event
vm.startPrank(bob);
marketplace.collectReward();
healthToken.approve(address(martenitsaEvent), 10 ** 18);
martenitsaEvent.joinEvent();
//Create Martenitsa Token
vm.expectRevert();
martenitsaToken.createMartenitsa("newMartenitsa");
//list for sell already owned Martenitsa token
vm.expectRevert();
marketplace.listMartenitsaForSale(0, 1 wei);
assert(martenitsaEvent.isProducer(bob));
assert(martenitsaEvent.getParticipant(bob));
assert(!martenitsaToken.isProducer(bob));
}

Impact

This issue directly breaks the purpuse and functionality of the Martenitsa event stated in the docs.

Tools Used

Manual review

Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

MartenitsaToken and MartenitsaEvent have different addresses

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.