The CoW Protocol Solver Rewards pipeline is a Python data pipeline that computes and distributes weekly solver reimbursements and COW token rewards. Each week the pipeline aggregates on-chain and off-chain data — execution costs, slippage, batch rewards, quote rewards, protocol fees, and partner fees — and produces signed multi-send transactions or CSV transfer files ready for the CoW Protocol team Safe.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 the pipeline does
Solvers on CoW Protocol submit and settle trade batches. At the end of every accounting period (a rolling 7-day window, evaluated each Tuesday), the pipeline:- Queries the analytics database (
fct_data_per_solver_and_accounting_period,fct_partner_and_protocol_fees) for each solver’s batch rewards, quote rewards, slippage, protocol fees, and network fees across bothprodandstagingorderbook environments. - Fetches supplementary data from Dune Analytics to determine the block range for the period and validate on-chain figures.
- Computes payouts — primary rewards in COW tokens, native-token reimbursements for execution costs and slippage, protocol fee forwarding to the protocol fee Safe, and partner fee distributions including a CoW DAO tax.
- Detects overdrafts — solvers whose net payout is negative are recorded in the on-chain overdrafts contract (
0x8Fd67Ea651329fD142D7Cfd8e90406F133F26E8a) rather than receiving a transfer. - Outputs results either as CSV transfer files in the
out/directory (for manual Safe upload) or as a multisend transaction posted directly to the CoW Team Safe via the Safe Transaction Service API. - Posts a Slack notification to the configured channel with transaction nonces and Safe queue links.
StartTime <= block_time < EndTime with a default length of 7 days.
Who uses it
- CoW Protocol team — responsible for running the pipeline each Tuesday, validating results against the Dune dashboard, and executing the multi-send transaction through the proposer account (
0xd8Ca5FE380b68171155C7069B8df166db28befdd). - Solver operators — receive COW token rewards and native-token reimbursements as a result of each weekly run. Operators in the CoW DAO bonding pool (
0x5d4020b9261f01b6f8a45db929704b0ad6f5e9e6), Rizzolver bonding pool (0x0deb0ae9c4399c51289adb1f3ed83557a56df657), or Fractal bonding pool (0x7719c9c0d35d460b00487a1744394e9525e8a42c) have their buffer accounting routed to theirreward_targetaddress.
Supported networks
The pipeline supports payout computation across all networks where CoW Protocol operates:NETWORK value | Chain |
|---|---|
mainnet | Ethereum Mainnet |
gnosis | Gnosis Chain |
arbitrum | Arbitrum One |
base | Base |
avalanche | Avalanche C-Chain |
polygon | Polygon |
bnb | BNB Smart Chain |
linea | Linea |
plasma | Plasma Mainnet |
ink | Ink |
NETWORK.
Weekly accounting cycle
The pipeline is run on a fixed weekly cadence:- The accounting period ends at Tuesday 00:00 UTC.
- The team waits for on-chain data to finalize — price feeds (
prices.usd), Ethereum transactions, and event logs can lag by several hours. - The payout script is run, generating a transfer file or posting directly to the Safe.
- Results are cross-checked against the Dune dashboard.
- The multi-send transaction is executed by the proposer account and team members are informed in the
#dev-multisigSlack channel.
Prerequisites
The following credentials and services are required before running the pipeline:
- Python >= 3.10 — the codebase uses
match/casestatements introduced in Python 3.10. A Docker image based on Python 3.12 is provided for environments where upgrading is not possible. - Dune API key — used to query on-chain data through the Dune Analytics API (
DUNE_API_KEY). - Analytics DB access — connection string for the CoW Protocol analytics PostgreSQL database, which exposes pre-computed dbt tables (
ANALYTICS_DB_URL). - Ethereum node — an RPC endpoint for the target network (
NODE_URL) and always a Mainnet endpoint (NODE_URL_MAINNET), used by the Safe transaction service client. - Safe API key — required when posting transactions to the Safe Transaction Service (
SAFE_API_KEY). - Proposer private key — only needed when using
--post-txto sign and submit the multisend transaction (PROPOSER_PK).
Next steps
Quickstart
Install dependencies, configure your environment, and generate your first transfer file.
Configuration
Full reference for every environment variable and how
AccountingConfig is assembled at runtime.