Documentation Index
Fetch the complete documentation index at: https://cowswap-mintlify-docs-quality-audit-1774257282.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Architecture
ComposableCoW is a modular system enabling conditional trading on CoW Protocol through separated authorization, validation, and execution layers.Core Components
ComposableCoW Contract
Serves as the central coordinator, implementingISafeSignatureVerifier to manage order authorization and validation. It tracks orders via two mechanisms:
- Single orders stored in a mapping indexed by owner and parameter hash
- Merkle roots for batch authorization of multiple orders
ExtensibleFallbackHandler
Deployed at0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5, it acts as a Safe fallback handler, delegating EIP-1271 signature verification to ComposableCoW through domain-specific verifiers.
Order Handlers
Implement conditional logic by extendingIConditionalOrder. The system includes:
IConditionalOrderGeneratorinterface for handlers that generate tradeable ordersBaseConditionalOrderabstract contract providing default verification logic- Specialized handlers like TWAP for time-weighted average price orders
Operational Flow
When a watchtower polls for tradeable orders, ComposableCoW:- Verifies authorization (single order or Merkle proof)
- Calls the handler’s
getTradeableOrder()to generate an order - Validates against any configured swap guards
- Returns the order and encoded signature
GPv2Settlement calls isValidSignature() on the Safe, which delegates through ExtensibleFallbackHandler to ComposableCoW for final verification.