Introduction
The CoW Protocol BFF is a comprehensive collection of TypeScript-based backend services designed to power the CoW Swap frontend and other CoW Protocol applications.
Core Capabilities
The platform offers six main feature categories:
-
Multi-Chain Support - Token pricing and balance data across eight networks (Ethereum, Gnosis Chain, Polygon, Arbitrum, Base, Avalanche, BNB Chain, and Sepolia testnet)
-
Real-Time Updates - Server-Sent Events delivering live wallet balance information for multiple tokens simultaneously
-
Notifications - Telegram integration with RabbitMQ messaging for order status alerts
-
Market Analysis - Dynamic slippage calculations based on volatility patterns
-
Transaction Preview - Tenderly-powered simulation tools for trade outcome forecasting
-
Yield Tracking - Multi-protocol DeFi opportunity aggregation and comparison
Technical Foundation
The architecture utilizes:
- Fastify - HTTP framework
- NX - Monorepo management
- PostgreSQL with TypeORM - Data persistence
- Redis - Caching
- RabbitMQ - Asynchronous messaging
- Ethers.js/Viem - Blockchain interactions
Service Components
Four primary applications form the system:
- API Service - REST endpoints
- Notification Producer - Event monitoring
- Telegram Service - Message delivery
- TWAP Service - Price calculations
These are supplemented by shared libraries for repositories, business logic, and utilities.Last modified on March 4, 2026