Off-chain relayer node that collects settlement intents, matches counterparties, batches trades and submits them to Setra's DVP Engine on Robinhood Chain.
Intent Submission
│
▼
┌─────────────┐
│ Redis Queue │ ← pending intents
└──────┬──────┘
│
▼
┌─────────────┐
│ Matcher │ ← filters expired, scores priority
└──────┬──────┘
│
▼
┌──────────────┐
│ Batch Executor│ ← gas estimation → on-chain settlement
└──────┬───────┘
│
▼
DVP Engine (on-chain)
The relayer runs on a configurable interval, pulling pending intents from Redis, filtering expired ones, scoring them by priority (value × urgency), and executing matched batches through the DVP Engine smart contract.
- Node.js 20+
- Redis 7+
- Access to Robinhood Chain RPC
Copy .env.example to .env and fill in the values:
| Variable | Description |
|---|---|
RPC_URL |
Robinhood Chain RPC endpoint |
PRIVATE_KEY |
Relayer operator private key |
REDIS_URL |
Redis connection string |
DVP_ENGINE_ADDRESS |
DVP Engine contract address |
REGISTRY_ADDRESS |
Asset Registry contract address |
BATCH_SIZE |
Max intents per batch (default: 25) |
BATCH_INTERVAL_MS |
Batch loop interval in ms (default: 5000) |
LOG_LEVEL |
Logging level (default: info) |
# Start relayer + Redis
docker compose up -d
# View logs
docker compose logs -f relayer# Install dependencies
pnpm install
# Run in dev mode with hot reload
pnpm dev
# Build
pnpm build
# Run tests
pnpm test
# Lint
pnpm lintMIT