Assessment reports>Staking>Threat Model>transfer

Function: transfer(address _recipient, uint256 _amount)

Performs the transfer of tokens.

Inputs

  • _recipient

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The account that will receive the tokens.

  • _amount

    • Control: Fully controlled by the caller.

    • Constraints: Checked that msg.sender can afford to transfer _amount of tokens.

    • Impact: The amount of tokens to be transferred.

Branches and code coverage (including function calls)

Intended branches

  • Checks that the _sender has enough balance.

  • Checks that the _recipient is not the zero address.

  • Checks that the _amount is greater than zero.

  • Decreases the balances for the _sender.

  • Increases the balances for the _recipient.

Negative behavior

  • Should not allow transferring more tokens than the _sender has.

Zellic © 2024Back to top ↑