Assessment reports>Ethena>Threat Models>addSupportedAsset

Function: addSupportedAsset(IERC20 _asset)

Allows owner of the contract to add asset address to the list of trusted assets.

Inputs

  • _asset

    • Constraints: No.

    • Impact: The address will be added to the supportedAssets. The users will be able to deposit the asset tokens after that.

Branches and code coverage (including function calls)

Intended branches

  • _asset was added to supportedAssets.

Negative behavior

  • Caller is not an owner.

  • supportedAssets already contains _asset.

Function call analysis

  • _supportedAssets.add(_asset)

    • External/Internal? Internal.

    • Argument control? _asset.

    • Impact: Add new _asset address to the _supportedAssets --- if already added, returns false.

Zellic © 2024Back to top ↑