Assessment reports>Ethena>Threat Models>mint

Function: mint(Receipt receipt, Signature takerSignature, Signature makerSignature)

Allows owner or account with Minter role to mint eUSD tokens for beneficiary.

Inputs

  • receipt

    • Constraints: receipt.order.asset should be _supportedAssets.

    • Impact: The approved and signed by minter data necessary to mint tokens.

  • takerSignature

    • Constraints: There is a check that the order hash was signed by benefactor.

    • Impact: The benefactor signature of the order.

  • makerSignature

    • Constraints: There is a check that the receipt hash was signed by Minter.

    • Impact: The minter signature of the receipt.

Branches and code coverage (including function calls)

Intended branches

  • The expected amount of eUSD was minted for beneficiary.

  • The assets tokens properly transferred from benefactor to custody addresses.

Negative behavior

  • The caller is not the Minter or Owner.

  • Mint the receipt with the same nonce twice.

Function call analysis

  • _transferCollateral -> token.safeTransferFrom(benefactor, addresses[i], amountToTransfer)

    • External/Internal? External.

    • Argument control? benefactor, addresses[i], and amountToTransfer.

    • Impact: Transfer assets tokens from benefactor to custody addresses.

  • eUSD.mint(receipt.order.beneficiary, receipt.affirmedAmount);

    • External/Internal? External.

    • Argument control? receipt.order.beneficiary and receipt.affirmedAmount.

    • Impact: Mint affirmedAmount of eUSD tokens to beneficiary.

Zellic © 2024Back to top ↑