Assessment reports>STFX>Threat Models>changeDepositToken

Function: changeDepositToken(address _depositToken, bool _isDepositToken)

Updates the whitelist of eligible deposit tokens that can be used in a spot. Can only be set by the owner of the Spot contract, which is a multi-sig.

Due diligence must be used to make sure these tokens do not introduce vulnerabilities.

Inputs

  • _depositToken

    • Control: Full.

    • Constraints: Nonzero.

    • Impact: Whitelists or blacklists a given token address for use in spots.

  • _isDepositToken

    • Control: Full.

    • Constraints: Bool.

    • Impact: Decides whitelist status.

Branches and code coverage (including function calls)

Intended branches

  • Whitelist token.

  • Blacklist token.

Negative behavior

  • Zero address.

Zellic © 2024Back to top ↑