Skip to main content

CoW Protocol Watch Tower

A standalone watch tower that monitors blockchain events for CoW Protocol programmatic orders and automatically posts them to the OrderBook API.

Quick start

Get your watch tower up and running in minutes

1

Install dependencies

Ensure you have Node.js (v16.18.0+) and yarn installed, then clone the repository and install dependencies.
git clone https://github.com/cowprotocol/watch-tower.git
cd watch-tower
yarn install
2

Configure your watch tower

Create a config.json file based on the example configuration. Specify the networks you want to monitor and your RPC endpoints.
cp config.json.example config.json
# Edit config.json with your settings
See the Configuration guide for detailed setup instructions.
3

Run the watch tower

Start monitoring conditional orders on your configured networks.
yarn cli run --config-path ./config.json
The watch tower will start processing events and posting orders to the OrderBook API. You can view metrics at http://localhost:8080/metrics.

Key features

Everything you need to monitor and manage programmatic orders

Multi-chain support

Monitor conditional orders across Ethereum, Arbitrum, Gnosis Chain, Base, and more EVM-compatible networks.

Event monitoring

Automatically detects ConditionalOrderCreated and MerkleRootSet events from the blockchain.

LevelDB registry

ACID-compliant storage with automatic cleanup of expired and cancelled orders.

REST API

Built-in API server with version info, config endpoints, and database dumps.

Prometheus metrics

Export metrics for monitoring active orders, owners, and processing performance.

Flexible deployment

Run locally, deploy with Docker, or install on DAppNode for decentralized infrastructure.

Explore the documentation

Learn about architecture, deployment options, and advanced configuration

Architecture

Understand how the watch tower processes events, manages state, and integrates with CoW Protocol.

CLI reference

Complete reference for all commands, options, and environment variables.

Core concepts

Learn about conditional orders, polling strategies, and the registry system.

Filter policies

Configure acceptance and rejection rules for orders, owners, and handlers.

Logging

Fine-tune log levels globally or per module for effective debugging.

Notifications

Set up Slack notifications for error monitoring and alerting.

Ready to deploy your watch tower?

Follow our deployment guides for Docker, DAppNode, or custom infrastructure setups.