Skip to main content

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.

The pipeline reads configuration exclusively from environment variables (loaded via python-dotenv from a .env file at the project root). Copy .env.sample to .env and fill in the values before running.

Network & Node

NETWORK
string
required
The EVM network to run accounting for. Must be one of: mainnet, gnosis, arbitrum, base, avalanche, polygon, bnb, linea, plasma, ink.
NETWORK=mainnet
NODE_URL
string
required
JSON-RPC endpoint for the target network specified by NETWORK. Used for on-chain queries (token decimals, Safe nonce, etc.) and for posting Safe transactions.
NODE_URL=https://mainnet.infura.io/v3/YOUR_KEY
NODE_URL_MAINNET
string
required
JSON-RPC endpoint specifically for Ethereum mainnet. Required even when NETWORK is set to another chain, because COW token payments are always proposed on mainnet via a nonce-shifted transaction.
NODE_URL_MAINNET=https://mainnet.infura.io/v3/YOUR_KEY

Dune Analytics

DUNE_API_KEY
string
required
API key for the Dune Analytics API. Used by DuneFetcher to execute on-chain queries that compute solver performance, slippage, and quote rewards.
DUNE_API_KEY=your_dune_api_key_here

Database

ANALYTICS_DB_URL
string
required
PostgreSQL connection URL for the CoW Protocol analytics database, without a trailing database name. The pipeline appends /{environment}_{network_db_name} dynamically (e.g. prod_mainnet, staging_xdai) to target each environment. Used by MultiInstanceDBFetcher to retrieve solver metrics from the dbt schema.
ANALYTICS_DB_URL=user:password@host:5432
BARN_DB_URL
string
PostgreSQL connection URL for the barn (staging) orderbook database.
BARN_DB_URL=postgresql://user:password@host:5432/barn
PROD_DB_URL
string
PostgreSQL connection URL for the production orderbook database.
PROD_DB_URL=postgresql://user:password@host:5432/prod

Safe & Payments

PAYOUTS_SAFE_ADDRESS
string
required
Checksum address of the Gnosis Safe on the target network that holds native token funds and signs reimbursement transactions.
PAYOUTS_SAFE_ADDRESS=0xA03be496e67Ec29bC62F01a428683D7F9c204930
PAYOUTS_SAFE_ADDRESS_MAINNET
string
required
Checksum address of the Gnosis Safe on Ethereum mainnet that holds COW tokens. COW rewards for all chains are paid from this safe using a nonce offset to allow multiple in-flight transactions.
PAYOUTS_SAFE_ADDRESS_MAINNET=0xA03be496e67Ec29bC62F01a428683D7F9c204930
PROPOSER_PK
string
Private key (hex, no 0x prefix) of the account authorised to sign and propose Safe transactions. When left empty the pipeline runs in read-only / dry-run mode and will not post any transactions.
Never commit a real private key to version control. Store it only in your local .env file.
PROPOSER_PK=
SAFE_API_KEY
string
API key for the Safe Transaction Service. Required when PROPOSER_PK is set and transactions need to be posted to the Safe queue.
SAFE_API_KEY=your_safe_api_key_here
NONCE_MODIFIER
integer
Overrides the automatic nonce offset applied to mainnet transactions. When not set, the pipeline computes a deterministic offset per network based on the reversed Network enum ordering so that simultaneous multi-chain runs can queue distinct transactions without nonce collisions.Default: computed from {network: idx for idx, network in enumerate(reversed(list(Network)), start=0)}
# Force a specific nonce offset (advanced use only)
NONCE_MODIFIER=3

Slack Notifications

SLACK_TOKEN
string
OAuth token for a Slack bot app. When provided together with SLACK_CHANNEL, the pipeline posts a summary of computed transfers to the channel after each run.
SLACK_TOKEN=xoxb-...
SLACK_CHANNEL
string
Slack channel ID (e.g. C01234ABCDE) where payout summaries are posted. Has no effect unless SLACK_TOKEN is also set.
SLACK_CHANNEL=C01234ABCDE

Output

FILE_OUT_PATH
string
Directory where CSV output files are written. Relative paths are resolved from the project root.Default: ./out
FILE_OUT_PATH=./out

Build docs developers (and LLMs) love