Introduction to ComposableCoW
ComposableCoW is the contract that implements programmatic orders (sometimes called conditional orders) on CoW Protocol. Programmatic orders execute automatically when predefined on-chain conditions are satisfied, functioning as smart contract-based trading strategies.
Primary Use Cases
The framework supports multiple order types:- TWAP: Distributes large trades across time intervals
- Good After Time: Activates orders after specific timestamps
- Stop Loss: Triggers sales when prices drop below oracle-determined thresholds
- Trade Above Threshold: Executes when token balances exceed minimums
- Perpetual Stable Swap: Maintains consistent token position ratios
Authorization Mechanisms
Two approaches are available:- Individual order creation via
ComposableCoW.create()for simpler scenarios - Merkle tree-based authorization for efficiently managing numerous programmatic orders with reduced on-chain storage requirements