Skip to main content


The router is accepts configuration using the config file config.json in the root directory of the docker-compose repo.

The JSON schema accepts the following keys:

  • adminToken: Required. Secret token used to authenticate admin requests.
  • mnemonic: Required. The mnemonic used to generate the private key.
  • chainConfig: Required. The chain configuration. A JSON object with the following keyed by chainId with the following object schema as value:
    • providers: Required. An array of providers URLs for a chain. Use a minimum of 1 URL, but additional URLs provide more fallback protection against provider issues.
    • confirmations: Optional. The number of confirmations required for a transaction to be considered valid on a chain. Defaults to defined values here.
    • minGas: Optional. The minimum gas amount required to be held by the router's signer address in order to participate in auctions. Defaults to 0.1 Ether units.
    • safeRelayerFee: Optional. The minimum fee amount required by the router to metaTx the transaction. Defaults to 0 Ether units.
  • swapPools: Required. An array of swap pools. Each pool is a JSON object with the following keys:
    • name: Optional. The name of the swap pool.
    • assets: Required. An array of assets. Each asset is a JSON object with the following keys:
      • assetId: Required. The asset ID (ERC20 token address). For native assets, use 0x0000000000000000000000000000000000000000.
      • chainId: Required. The chain ID.
  • logLevel: Optional. The log level. One of fatal, error, warn, info, debug, trace, silent. Default is info.
  • port: Optional. The port the router will listen on. Defaults to 8080.
  • host: Optional. The host the router will listen on. Defaults to
  • network: Optional. The network to connect to (separate from blockchain network). One of testnet, mainnet, local. Defaults to mainnet.

Example Configuration File#

{  "adminToken": "blahblah",  "chainConfig": {    "4": {      "providers": [""],    },    "5": {      "providers": [""],    }  },  "logLevel": "info",  "mnemonic": "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat",  "network": "mainnet",  "swapPools": [    {      "name": "TEST",      "assets": [        { "chainId": 4, "assetId": "0x9aC2c46d7AcC21c881154D57c0Dc1c55a3139198" },        { "chainId": 5, "assetId": "0x8a1Cad3703E0beAe0e0237369B4fcD04228d1682" }      ]    }  ]}