Skip to main content

IFlashLoanRouter contract

This contract manages all flash-loan requests and is eventually responsible for executing the settlement.

Data Types and Storage

Functions

flashLoanAndSettle

Request all flash loan specified in the input and, after that, executes the specified settlement.

borrowerCallBack

Once a borrower has received the proceeds of a flash loan, it calls back the router through this function.

settlementContract

The settlement contract supported by this router. This is the contract that will be called when the settlement is executed.

settlementAuthentication

The settlement authenticator contract for CoW Protocol. This contract determines whether CoW protocol considers an address an eligible solver.

IBorrower contract

IBorrower is an abstraction around specific flash-loan providers. Each provider has slightly different syntax for the loan request, as well as for the function that is called back. The borrower contract abstracts this away for the router.

Data Types and Storage

Functions

flashLoanAndCallBack

Requests a flash loan with the specified parameters from the lender and, once the funds have been received, call back the router while passing through the specified custom data. The flash-loan repayment is expected to take place during the final settlement in the router.

approve

Approves the target address to spend the specified token on behalf of the Borrower up to the specified amount.

settlementContract

The settlement contract supported by this contract.

router

The router contract that manages this borrower contract. It will be called back once the flash-loan proceeds are received and is the only address that can trigger a flash loan request.
Last modified on March 12, 2026