Beginner FriendlyFoundryGameFi
100 EXP
View results
Submission Details
Severity: low
Invalid

`HealthToken` will be bricked if `HealthToken::setMarketAndVotingAddress` is never called by the Owner

Summary

If the Owner of the HealthToken smart contract never calls HealthToken::setMarketAndVotingAddress health tokens will never be distributed

Vulnerability Details & Impact

The only addresses that are allowed to call distributeHealthToken are the MartenitsaMarketplace and MartenitsaVoting and this is the only way HealthTokens are minted to users or producers.

function distributeHealthToken(address to, uint256 amount) external {
require(msg.sender == address(_martenitsaMarketplace) || msg.sender == address(_martenitsaVoting), "Unable to call this function");
uint256 amountToMint = amount * 10 ** 18;
_mint(to, amountToMint);
}

If this function is never called the contract will never distribute HealthTokens and major functionalities of the Baba Marta system will be broken.

Tools Used

Manual Review

Recommendations

Set these addresses in the constructor.

Updates

Lead Judging Commences

bube Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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