Batch-Auction Settlement Prices Per Token Direction
In a CoW batch, every order trading the same token pair in the same direction gets one common clearing price; the opposite direction can clear at a different price. For an order you are checking, that means the solver’s price is the key input to compare with your limit, while the final executed amounts tell you what actually settled. If you are checking a trade on the cowswap interface, read the price alongside the sell amount, buy amount, fee and fill status: a displayed quote is not the batch’s final settlement.
The solver proposes prices with executable amounts
A solver builds a candidate solution from eligible orders and available liquidity, then submits it for competition. The solution specifies which orders to fill, each order’s sell and buy amounts, and the trades against liquidity sources. The price is therefore part of a feasible settlement proposal, not a market-wide number calculated independently of the route.
Uniform Directional Clearing Prices (UDCP) constrain that proposal: orders swapping the same pair in the same direction must get the same effective price within a solution. Fees matter to the calculation. The CoW Protocol specification defines the price at the swap point net of the relevant fee; for a sell-token fee, it uses the amount sold less that fee relative to the amount bought. Hook orders can receive a different price to account for their additional gas cost.
UDCP does not require the reverse direction to receive the reciprocal price. Nor does it require the same price in every solution from every solver. It limits price discrimination among same-direction orders in a particular candidate solution; the winning solution sets the terms that settle.
Competition chooses a fair solution, not a textbook marginal price
Solvers compete by submitting candidate solutions and scores, with scores based roughly on order surplus and protocol fees converted to a common numéraire. The protocol first establishes the best individual bids for each directed token pair as reference outcomes. It filters batched bids that give any directed pair less than its reference outcome, then selects a winning combination of bids that maximizes score subject to the protocol’s rules and computational constraints.
That sequence matters: a batch auction does not necessarily find one price where aggregate supply equals aggregate demand. A solver may match opposing orders directly, route residual amounts through on-chain liquidity, or combine several paths. The clearing price reflects the winning feasible solution and its available liquidity; the auction score decides among valid solutions. CoW DAO’s CIP-67 describes the fair combinatorial auction, while the protocol specification sets out the UDCP and scoring rules.
Trace one order from limit to settlement
Suppose three users sell token X for token Y in one batch. One sells 10 X with a minimum of 19.6 Y, another sells 4 X with a minimum of 7.8 Y, and a third sells 2 X with a minimum of 4 Y. If a candidate solution clears this direction at 2 Y per X before applicable fees, their gross outputs are 20, 8 and 4 Y respectively; fees or hook costs can alter the effective amounts shown to each user.
To evaluate your order, check the steps in this order:
- Confirm the direction and units: here, X is sold and Y is received.
- Compare the effective settlement price with your signed limit, accounting for the fee convention.
- Check the executed amounts. A partially fillable order can settle for less than its maximum; an unfilled remainder may stay eligible for a later auction.
- Inspect the actual route and fees to understand how the solution produced the price.
In this example, the 2 Y per X proposal clears all three limits before fees. If fees reduce an order’s effective proceeds below its minimum, that order cannot be executed at those terms: the on-chain limit-price check rejects a violation. A solver may instead change the route or amounts, leave an order unfilled, or submit another solution. So a favorable candidate price does not guarantee that every order fills.
Use the settled amounts to judge the result
For a completed trade, calculate the effective rate from the actual net amounts in the same units as the limit. This is the practical check for whether your specific order received acceptable terms; a quoted rate alone cannot show whether it partially filled, paid a fee, or followed a different route. The protocol also enforces fair-bid filtering so a multi-pair batch cannot degrade a directed pair below its best standalone reference outcome.
On cowswap, treat the batch price as a per-direction clearing constraint and use your own net execution to assess the trade; for a new limit order, set the minimum output or maximum input at the rate you are prepared to accept. The decision rule is simple: compare net settled amounts with your signed limit, and assess the route only after confirming the fill.
Comments
Post a Comment