A coincidence of wants occurs when one participant offers an asset another participant wants, and the exchange terms are compatible. In a swap system, opposing orders can provide liquidity to each other instead of routing their entire amounts through a pool.
A complete match
Suppose, hypothetically, Alice wants to exchange 10 A for at least 20 B. Bob wants to exchange 20 B for at least 10 A. Ignoring settlement charges and assuming both orders are eligible, those quantities can satisfy each other exactly.
The settlement still needs to verify authorization and move the assets. “Direct matching” does not mean the participants can omit the protocol's execution rules or trust each other to transfer later.
CoW's explanation describes both full and partial matches as well as more complex relationships involving several orders.
A partial match
If Alice wants to sell 15 A on the same terms while Bob still supplies only 20 B, the direct match covers 10 A. The remaining 5 A needs another compatible order or external liquidity. A solver can combine internal matching with an AMM leg if the full settlement remains valid.
These quantities are an illustration of accounting, not a claim about a live market or a protocol's fee policy.
Opposite direction is necessary but insufficient
If Alice requires at least 2.2 B per A while Bob is willing to pay at most 2 B per A, simply placing them in one batch does not close the gap. A matching opportunity needs compatible prices, sizes and eligibility.
Time also matters: the two orders must be available to the same fulfillment process while valid. A buy yesterday and a sell today do not form a current match just because they concern the same assets.
This is why batching can improve execution without guaranteeing it. It gives the optimizer more relationships to consider. The actual benefit depends on the orders present and the settlement terms they permit.
Three orders and one residual
Consider a separate hypothetical batch at compatible one-for-two A/B terms. Alice sells 10 A for 20 B, Ben sells 6 B for 3 A, and Cara sells 10 B for 5 A. Ben and Cara together provide 16 B and require 8 A. Their combined flow can match 8 A of Alice's order. Her remaining 2 A still needs 4 B from another compatible source if the full order must settle.
This is netting of compatible quantities, not cancellation of user obligations. Each participant must receive the amount required by the applicable settlement terms. If Cara instead demands 6 A for her 10 B, the one-for-two relationship no longer satisfies her limit; adding her order to the batch does not solve that incompatibility.
Sources & verification (2)
Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.
- Coincidence of Wants
Matching opposing order flows and residual AMM execution.
https://docs.cow.fi/cow-protocol/concepts/how-it-works/coincidence-of-wants - GPv2Settlement
Settlement checks, partial order constraints and clearing-price mechanics.
https://docs.cow.fi/cow-protocol/reference/contracts/core/settlement