Assessment reports>Orderly Network>Threat Model>addBalance

Function: addBalance(AccountTypes.Account account, byte[32] tokenHash, uint128 amount)

This facilitates increasing the balance of a given token for a given account.

Inputs

  • account

    • Control: Fully controllable by calling function.

    • Constraints: None.

    • Impact: The account whose balance is to be increased.

  • tokenHash

    • Control: Fully controllable by calling function.

    • Constraints: None.

    • Impact: The token whose balance is to be increased.

  • amount

    • Control: Fully controllable by calling function.

    • Constraints: None.

    • Impact: The amount by which the balance is to be increased.

Branches and code coverage

Intended branches

  • Account balance is increased by the amount.

Negative behavior

  • Should not allow increasing balance for an invalid token. This is presumably checked at other functions' levels.

Zellic © 2024Back to top ↑