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 supports ten EVM networks. Each network has a dedicated set of payment addresses, token addresses, reward caps, and Dune identifiers derived from the Network enum in src/config.py.

Network enum

class Network(Enum):
    """Network class for networks supported by the accounting."""

    MAINNET      = "mainnet"
    BASE         = "base"
    ARBITRUM_ONE = "arbitrum"
    BNB          = "bnb"
    AVALANCHE    = "avalanche"
    POLYGON      = "polygon"
    GNOSIS       = "gnosis"
    LINEA        = "linea"
    PLASMA       = "plasma"
    INK          = "ink"
The string value of each variant is what the NETWORK environment variable must be set to.

Per-network reference table

NetworkEnum valueDune blockchainNative tokenEthereumNetwork
Ethereum mainnetmainnetethereumETHMAINNET
Gnosis ChaingnosisgnosisxDAIGNOSIS
Arbitrum OnearbitrumarbitrumETHARBITRUM_ONE
BasebasebaseETHBASE
Avalanche C-Chainavalancheavalanche_cAVAXAVALANCHE_C_CHAIN
PolygonpolygonpolygonPOLPOLYGON
BNB Smart ChainbnbbnbBNBBNB_SMART_CHAIN_MAINNET
LinealinealineaETHLINEA
PlasmaplasmaplasmaXPLPLASMA_MAINNET
InkinkinkETHINK

Minimum transfer thresholds

To avoid dust payments, transfers below these amounts are filtered out.
NetworkMin native token transferMin COW transfer
Mainnet0.001 ETH (10¹⁵ wei)10 COW (10 × 10¹⁸ atoms)
Gnosis0.01 xDAI (10¹⁶ wei)1 COW (10¹⁸ atoms)
Arbitrum One0.0001 ETH (10¹⁴ wei)1 COW (10¹⁸ atoms)
Base0.0001 ETH (10¹⁴ wei)1 COW (10¹⁸ atoms)
Avalanche0.0001 AVAX (10¹⁴ wei)1 COW (10¹⁸ atoms)
Polygon0.0001 POL (10¹⁴ wei)1 COW (10¹⁸ atoms)
BNB0.0001 BNB (10¹⁴ wei)1 COW (10¹⁸ atoms)
Linea0.0001 ETH (10¹⁴ wei)1 COW (10¹⁸ atoms)
Plasma0.0001 XPL (10¹⁴ wei)1 COW (10¹⁸ atoms)
Ink0.0001 ETH (10¹⁴ wei)1 COW (10¹⁸ atoms)

Quote reward cap (native token)

The per-quote reward paid to solvers is capped at the lower of the COW reward (quote_reward_cow, uniform at 6 × 10¹⁸ atoms) and the native-token equivalent cap below.
Networkquote_reward_cap_native (atoms)Human-readable
Mainnet7 × 10¹⁴0.0007 ETH
Gnosis15 × 10¹⁶0.15 xDAI
Arbitrum One24 × 10¹³0.00024 ETH
Base24 × 10¹³0.00024 ETH
Avalanche6 × 10¹⁵0.006 AVAX
Polygon6 × 10¹⁷0.6 POL
BNB1 × 10¹⁵0.001 BNB
Linea3 × 10¹³0.00003 ETH
Plasma6 × 10¹⁷0.6 XPL
Ink3 × 10¹³0.00003 ETH

Wrapped token addresses

Each network has two wrapped-token addresses tracked in PaymentConfig:
  • wrapped_native_token_address — the canonical wrapped version of the network’s native gas token (e.g. WETH on mainnet).
  • wrapped_eth_address — the address of wrapped ETH on that network. On Ethereum and Arbitrum these are the same; on Avalanche, Polygon, BNB, Plasma, and others they differ.
Networkwrapped_native_token_addresswrapped_eth_address
Mainnet0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 (WETH)same
Gnosis0xe91d153e0b41518a2ce8dd3d7944fa863463a97d (WXDAI)0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1
Arbitrum One0x82af49447d8a07e3bd95bd0d56f35241523fbab1 (WETH)same
Base0x4200000000000000000000000000000000000006 (WETH)same
Avalanche0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7 (WAVAX)0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB
Polygon0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270 (WPOL)0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619
BNB0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c (WBNB)0x4db5a66e937a9f4473fa95b1caf1d1e1d62e29ea
Linea0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f (WETH)same
Plasma0x6100e367285b01f48d07953803a2d8dca5d19873 (WXPL)0x9895d81bb462a195b4922ed7de0e3acd007c32cb
Ink0x4200000000000000000000000000000000000006 (WETH)same

Orderbook database names

OrderbookConfig maps each network to a database name in the analytics PostgreSQL instance:
Networknetwork_db_name
Mainnetmainnet
Gnosisxdai
Arbitrum Onearbitrum-one
Basebase
Avalancheavalanche
Polygonpolygon
BNBbnb
Linealinea
Plasmaplasma
Inkink
All networks use the dbt schema.

Nonce modifier system

Because COW token rewards for every network are paid from the same mainnet Safe, the pipeline must queue one transaction per network without nonce conflicts. It achieves this by adding a per-network integer offset to the current Safe nonce. The default offsets are computed by reversing the Network enum declaration order and assigning indices starting at 0:
nonce_modifier_dict = {
    network: idx
    for idx, network in enumerate(reversed(list(Network)), start=0)
}
This produces the following default offsets (order may shift if new networks are added):
NetworkDefault nonce offset
MAINNET9
BASE8
ARBITRUM_ONE7
BNB6
AVALANCHE5
POLYGON4
GNOSIS3
LINEA2
PLASMA1
INK0
Override the automatic offset by setting the NONCE_MODIFIER environment variable when running the pipeline manually.

AccountingConfig.from_network() factory

AccountingConfig is the root configuration object that aggregates all sub-configs. It is constructed by calling the from_network() factory with the resolved Network enum value:
@staticmethod
def from_network(network: Network) -> AccountingConfig:
    return AccountingConfig(
        payment_config=PaymentConfig.from_network(network),
        orderbook_config=OrderbookConfig.from_network(network),
        dune_config=DuneConfig.from_network(network),
        node_config=NodeConfig.from_env(),
        reward_config=RewardConfig.from_network(network),
        protocol_fee_config=ProtocolFeeConfig.from_network(network),
        buffer_accounting_config=BufferAccountingConfig.from_network(),
        io_config=IOConfig.from_env(),
        overdraft_config=OverdraftConfig.from_network(network),
    )
The NETWORK environment variable is read inside IOConfig.from_env() and drives the Network enum resolution used by all other sub-config factories.