Assessment reports>GTE>Threat Model>creditAccount

Function: creditAccount(address account, address token, uint256 amount)

This function allows a trusted market contract created by the owner of the contract using the createMarket function to add tokens to the internal account balance.

Inputs

  • account

    • Control: Full control.

    • Constraints: N/A.

    • Impact: The account will be credited.

  • token

    • Control: Full control.

    • Constraints: N/A.

    • Impact: The token address to credit.

  • amount

    • Control: Full control.

    • Constraints: N/A.

    • Impact: The amount of tokens to credit.

Branches and code coverage

Intended branches

  • The internal balance of the account has been increased by the amount.

Negative behavior

  • The caller is not a trusted market.

Function call analysis

  • CLOBManagerStorageLib.creditAccount(this._getStorage(), account, token, amount)

    • What is controllable? token, account, and amount.

    • If the return value is controllable, how is it used and how can it go wrong? This function does not return a value.

    • What happens if it reverts, reenters or does other unusual control flow? Increases the internal account balance using the specified amount.

Zellic © 2025Back to top ↑