Assessment reports>Ethena>Threat Models>rescueTokens

Function: rescueTokens(IERC20 token, uint256 amount, address to)

Allows the owner to rescue tokens accidentally sent to the contract.

Inputs

  • token

    • Constraints: Cannot be the same address as of eUSD.

    • Impact: The token to be rescued.

  • amount

    • Constraints: N/A.

    • Impact: The amount of tokens to be rescued.

  • to

    • Constraints: N/A.

    • Impact: The address to be rescued to.

Branches and code coverage (including function calls)

Intended branches

  • Tokens are successfully rescued to an address.

Negative behavior

  • The contract call was reverted because the token address is the same as the eUSD address.

Function call analysis

  • rescueTokens -> token.safeTransfer(to, amount)

    • External/Internal? External.

    • Argument control? to and amount.

    • Impact: Safely transfer a certain amount of a token to the specific address to.

Zellic © 2024Back to top ↑