Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cowprotocol/flash-loan-router/llms.txt

Use this file to discover all available pages before exploring further.

Flash Loan Router for CoW Protocol

Execute CoW Protocol settlements with flash loan capabilities from multiple providers. Secure, modular infrastructure for solvers.

Quick start

Get up and running with Flash Loan Router in minutes

1

Install Foundry

The Flash Loan Router is built with Foundry. Install it if you haven’t already:
curl -L https://foundry.paradigm.xyz | bash
foundryup
2

Clone the repository

Clone the Flash Loan Router repository and install dependencies:
git clone https://github.com/cowprotocol/flash-loan-router.git
cd flash-loan-router
forge install
3

Build and test

Build the contracts and run the test suite:
forge build
forge test
To exclude tests requiring an internet connection, run:
forge test --no-match-path 'test/e2e/**/*'
4

Deploy contracts

Configure your environment and deploy:
cp .env.example .env
# Edit .env with your configuration
forge script script/DeployAllContracts.s.sol:DeployAllContracts --rpc-url $ETH_RPC_URL --private-key $PRIVATE_KEY --broadcast

Key features

Everything you need for flash loan-powered settlements

Multi-Provider Support

Support for Aave, Maker, and any ERC-3156 compatible flash loan provider

Secure by Design

Solver authentication and execution control ensure only authorized settlements

Modular Architecture

Extensible borrower adapter system for adding new flash loan providers

Deterministic Deployment

CREATE2 deployment ensures same addresses across all supported networks

Ready to integrate flash loans?

Start building with the Flash Loan Router and execute settlements with borrowed funds from multiple providers.

Get Started Now