Assessment reports>Ethena>Threat Models>mint

Function: mint(address user, address onBehalfOf, uint256 amount, uint256 index)

This function mints tokens for a specified address, adjusts borrowing allowances if needed, and returns the success of the operation and updated total supply.

Inputs

  • user

    • Constraints: N/A.

    • Impact: The address performing the mint.

  • onBehalfOf

    • Constraints: N/A.

    • Impact: The address of the user that will receive the scaled tokens.

  • amount

    • Constraints: N/A.

    • Impact: The amount of tokens getting minted.

  • index

    • Constraints: N/A.

    • Impact: The next liquidity index of the reserve.

Branches and code coverage (including function calls)

Intended branches

  • Mints tokens successfully.

Negative behavior

  • Revert due to invalid burn amount.

Function call analysis

  • mint -> _mintScaled(user, onBehalfOf, amount, index)

    • External/Internal? Internal.

    • Argument control? user, onBehalfOf, amount, and index.

    • Impact: Mint a scaled balance token.

Zellic © 2024Back to top ↑