Assessment reports>WOOFi Swap>Threat Model>deposit

Function: deposit(address token, uint256 amount)

Allows the owner to deposit tokens into the contract.

Inputs

  • token

    • Control: Fully controlled.

    • Constraints: Assumed that the token is a valid ERC-20 token.

    • Impact: The token to deposit.

  • amount

    • Control: Fully controlled.

    • Constraints: Will fail if msg.sender does not have enough tokens.

    • Impact: The amount of tokens to deposit.

Branches and code coverage

Intended branches

  • Increase the balance of the token for the contract.

  • Decrease the balance of the token for the caller.

  • Adapt the reserve of the token by the amount deposited.

Negative behavior

  • Should not be callable by anyone other than the admin.

Zellic © 2024Back to top ↑