Slippage accounting measures the net token imbalance a solver introduces when settling a batch. Positive slippage means the solver gained tokens (a surplus), and negative slippage means the solver lost tokens (a deficit). Because solvers interact with external liquidity venues whose prices move between trade signing and settlement, this imbalance is unavoidable — the pipeline simply measures and accounts for it.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cowprotocol/solver-rewards/llms.txt
Use this file to discover all available pages before exploring further.
What is slippage in this context?
In the CoW Protocol settlement context, a solver’s slippage is the difference between the tokens a solver was expected to exchange and the tokens that were actually transferred in its settlement transaction. It is computed entirely from on-chain token transfer events, not from any off-chain price model. The canonical reference is theperiod_slippage.sql Dune query (also browsable at Dune Analytics query #3427730).
Batch-wise token imbalance
Slippage is computed per settlement transaction by constructing a token balance sheet for the CoW Protocol settlement contract. Every transfer in or out of the settlement contract is classified into one of four categories:| Category | Direction | Meaning |
|---|---|---|
USER_IN | Inbound | Tokens sent by a user into the settlement contract (adjusted for fees) |
USER_OUT | Outbound | Tokens sent from the settlement contract back to a user |
AMM_IN | Inbound | All other inbound transfers (from AMMs, WETH wraps, sDAI wraps, etc.) |
AMM_OUT | Outbound | All other outbound transfers (to AMMs, WETH unwraps, sDAI unwraps, etc.) |
IN means the settlement contract is the recipient of the transfer, and OUT means the settlement contract is the sender.
Transfer type classification rules
AMM_IN/AMM_OUT is a broad catch-all. It captures not only genuine AMM liquidity interactions but also WETH wraps and unwraps and sDAI wraps and unwraps.Price evaluation in ETH
Token imbalances are denominated in their native units (e.g., USDC atoms, WBTC satoshis). To aggregate across all tokens, each imbalance is converted to ETH using two price sources:prices.usdhourly mean — Dune’sprices.usdtable provides hourly USD prices for most tokens. The pipeline takes the mean price over the settlement’s hour.- Intrinsic token prices — For tokens not covered by
prices.usd, the pipeline falls back to the “intrinsic” prices embedded in the settlement calldata itself.
period_slippage.sql query (lines 354–436).
Wait for price data to finalize. Dune’s
prices.usd table is populated from off-chain price feeds with a lag. Running the pipeline immediately after a period ends will produce incorrect (often zero) slippage values for recent settlements. The README explicitly warns: “we must wait some time after the period has ended for some data to finalize (e.g. prices.usd, ethereum.transactions, our event data, etc.).”How slippage_eth is combined with network_fee_eth
The Dune query returns two separate fields per solver: slippage_eth (the net token imbalance in ETH) and network_fee_eth (the gas cost the solver paid for settlements). These are merged into a single slippage_eth value in RewardAndPenaltyDatum.from_series():
self.slippage_eth in RewardAndPenaltyDatum represents the total buffer impact: both the raw token imbalance and the gas cost the solver paid.
Impact on total payout
Slippage feeds directly into the total outgoing native-token amount:total_eth_rewardis the batch reward scaled by(1 - service_fee), or the raw value if it’s negativeslippage_ethis the combined token imbalance + network fee (can be negative)
slippage_eth is positive, the settlement contract owes the solver more (it gained tokens on their behalf). When it is negative, the solver owes the settlement contract (it lost tokens). A large enough negative slippage_eth can make total_outgoing_eth() negative, triggering an overdraft.
- Positive slippage
- Negative slippage (within reward)
- Overdraft
The solver created a surplus — e.g., got better prices than expected from AMMs.
Slippage in the payout flow
Theslippage_eth column from SOLVER_PAYOUTS_COLUMNS enters the pipeline in compute_solver_payouts():
