Assessment reports>Orderly Network>Threat Model>setLedger

Function: setLedger(address _ledger)

This allows the owner of the contract to set the address of the Ledger contract.

Inputs

  • _ledger

    • Control: onlyOwner of contract can call this function.

    • Constraints: The new address is not zero.

    • Impact: The Ledger contract is called to process withdraw, settlement, adl, and liquidation events and to upload a perpetual futures trade.

Branches and code coverage

Intended branches

  • New address was set successfully.

Negative behavior

  • Zero address.

  • The same address already set.

  • Caller is not an owner.

Zellic © 2024Back to top ↑