Assessment reports>Mantle>Threat Models>mint

Function: mint(address _recipient, uint256 _amount)

Mints new tokens at the amount _amount and assigns them to address _recipient.

Inputs

  • _recipient

    • Control: Full.

    • Constraints: Discarded.

    • Impact: Discarded.

  • _amount

    • Control: Full.

    • Constraints: Needs to be less than maximumMintAmount.

    • Impact: Allows _amount number of tokens to be minted.

Branches and code coverage (including function calls)

Intended branches

  • Successfully mints if all conditions are met.

Negative behavior

  • Reverts if _amount is greater than maximumMintAmount.

  • Reverts if block.timestamp is less than nextMint.

  • Reverts if the caller is now the owner.

Function call analysis

  • mint -> totalSupply()

    • What is controllable? Discarded.

    • If return value controllable, how is it used and how can it go wrong? Discarded.

    • What happens if it reverts, reenters, or does other unusual control flow? Discarded.

Zellic © 2024Back to top ↑