Assessment reports>Omron>Threat Model>deposit

Function: deposit(address _tokenAddress, uint256 _amount)

This function is used to deposit a token into the contract.

Inputs

  • _tokenAddress

    • Control: Arbitrary.

    • Constraints: Only whitelisted token.

    • Impact: Address of the token to be deposited.

  • _amount

    • Control: Arbitrary.

    • Constraints: Nonzero amount.

    • Impact: Amount of the token to be deposited.

Branches and code coverage

Intended branches

  • Updates the user's points information by invoking _updatePoints.

  • Updates the user's token balance and points per hour.

  • Transfers the token from the caller to the contract.

Negative behavior

  • Reverts if reentrancy is detected.

  • Reverts if the contract is paused.

  • Reverts if the deposit stop time has been set.

  • Reverts if the amount is zero.

  • Reverts if the token is not whitelisted.

  • Reverts if the token transfer fails.

Zellic © 2025Back to top ↑