Assessment reports>Gasp Node and Monorepo>Threat Model>deposit_erc20

Function: deposit_erc20(address tokenAddress, uint256 amount)

This function is for depositing ERC-20 tokens to the contract.

Inputs

  • tokenAddress

    • Control: Fully controlled by the caller.

    • Constraints: The address must be nonzero.

    • Impact: Address of the token.

  • amount

    • Control: Fully controlled by the caller.

    • Constraints: Must be nonzero.

    • Impact: Amount to transfer.

Branches and code coverage

Intended branches

  • Transfer the expected amount of the tokens.

Negative behavior

  • Revert when the token address is zero.

  • Revert when the amount is zero.

  • Revert when the transfer fails.

Zellic © 2025Back to top ↑