Assessment reports>Ethena>Threat Models>transferToCustody

Function: transferToCustody(address wallet, address asset, uint256 amount)

Allows owner or account with the Minter role to transfer tokens or native tokens from the current contract to the trusted custody wallet.

Inputs

  • wallet

    • Constraints: the CustodyWallet should contain the wallet address.

    • Impact: The receiver of tokens.

  • asset

    • Constraints: No.

    • Impact: The token address.

  • amount

    • Constraints: No.

    • Impact: The amount will be transferred.

Branches and code coverage (including function calls)

Negative behavior

  • The caller is not a Minter.

  • The caller is not an owner.

  • The wallet is not trusted.

Function call analysis

  • wallet.call{value: amount}('')

    • External/Internal? External.

    • Argument control? wallet and amount.

    • Impact: Transfer native tokens from the current contract to a trusted wallet.

  • IERC20(asset).safeTransfer(wallet, amount)

    • External/Internal? External.

    • Argument control? asset, wallet, and amount.

    • Impact: Transfer asset tokens from the current contract to a trusted wallet account.

Zellic © 2024Back to top ↑