MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: medium
Invalid

Use of Hardcoded Minting Limit

Summary

The mint function in StETHMock contract limits the _amount to 1000 * (10 ** decimals()), which is a hardcoded constraint that might not be suitable for all testing scenarios or future adjustments.

Vulnerability Details

require(_amount <= 1000 * (10 ** decimals()), "StETHMock: amount is too big");

The require statement checks that the _amount specified for minting does not exceed 1000 * (10 ** decimals()). This limit is hardcoded into the contract, meaning that it is fixed and cannot be changed without deploying a new version of the contract.

Impact

The limit cannot be adjusted to accommodate different scenarios or changes in the token's use case or economy. If the need arises to mint more than the hardcoded limit, the contract would need to be redeployed with a new limit.

Tools Used

Manual Review

Recommendations

The contract could be designed with a mechanism to update the minting limit. This could be achieved by introducing a state variable to store the limit and a function that allows the contract owner (or a governance process) to update it.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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