Assessment reports>Cove>Threat Model>_processExternalTrades

Function: _processExternalTrades(BasketManagerStorage self, ExternalTrade[] externalTrades)

This function handles the processing of external trades.

Inputs

  • self

    • Control: Controlled by the calling function.

    • Constraints: None.

    • Impact: The storage reference.

  • externalTrades

    • Control: Controlled by the calling function.

    • Constraints: None. Assumed to be validated by upper-level functions.

    • Impact: The external trades to be processed.

Branches and code coverage

Intended branches

  • Assume that the trades are most efficiently ordered. This is not enforced in code, and responsibility for this comes from the proposer.

  • Finalize the tokenSwap via CoW Swap. (Handled in the _completeTokenSwap call.)

  • Update the basket balance of every basket with the results of the trades if applicable.

Negative behavior

  • Should not be directly callable by external users.

Zellic © 2025Back to top ↑