Assessment reports>SSI Protocol>Threat Model>addSwapRequest

Function: addSwapRequest(OrderInfo orderInfo, bool inByContract, bool outByContract)

This function adds a new swap request.

Inputs

  • orderInfo

    • Control: Controlled by the caller of the contracts that use the swap.

    • Constraints: Must be a valid order.

    • Impact: Specifies the order to process.

  • inByContract

    • Control: Controlled by the caller (contracts).

    • Constraints: None.

    • Impact: Specifies whether the contract receives ERC-20 tokens for this swap or not.

  • outByContract

    • Control: Controlled by the caller (contracts).

    • Constraints: None.

    • Impact: Specifies whether the contract sends ERC-20 tokens for this swap or not.

Branches and code coverage

Intended branches

  • Add the order to the storage.

Negative behavior

  • The caller is a taker.

  • Given order is valid.

  • Given input and output tokens are valid if inByContract or outByContract is true, respectively.

Zellic © 2025Back to top ↑