Orders
CoW Protocol uses an intent-based order system where users express trading preferences off-chain, and solvers compete to find the best execution.
Order Structure
Orders contain 12 parameters defining trading intent:
Order Types
Sell Orders
Specify an exact amount to sell with a minimum buy amount guaranteed:
sellAmount is the exact amount of sell tokens to exchange
buyAmount is the minimum acceptable amount of buy tokens
Buy Orders
Specify an exact amount to buy with a maximum sell amount capped:
buyAmount is the exact amount of buy tokens to receive
sellAmount is the maximum amount of sell tokens to spend
Order UID
Each order receives a unique 56-byte UID combining:
- Order digest (32 bytes) - EIP-712 hash of the order
- Owner address (20 bytes) - The order creator
- Validity timestamp (4 bytes) - Expiration time
EIP-712 Signing
Orders use typed EIP-712 signatures enabling hardware wallet support. The protocol hashes order data with a domain separator to create an order digest.
Signature Schemes
CoW Protocol supports four signing methods:
Balance Sources
Users can source tokens from three different balance types:
- ERC20 - Standard ERC20 token balances
- External - Balancer Vault external balances
- Internal - Balancer Vault internal balances
Order Validation
During settlement, five checks occur:
- Signature validity - Verifies the order was signed by the owner
- Expiration status - Ensures
validTo has not passed
- Limit price compliance - Checks that clearing prices respect order limits
- Fill amount verification - Prevents overfilling
- Sufficient balance - Confirms the user has enough tokens
Order Lifecycle
- Created - Order signed off-chain
- Submitted - Order sent to the order pool
- Filled - Order completely executed
- PartiallyFilled - Order partially executed (if
partiallyFillable is true)
- Expired - Order
validTo timestamp has passed
- Cancelled - Order invalidated by the owner
Last modified on March 4, 2026