Flash Loans
Try It: Estimate an Arb
import { floeActionProvider } from "floe-agent";
// Estimate profit for a USDC → WETH → USDC route through Aerodrome
const estimate = await agentkit.invoke("estimate_flash_arb_profit", {
token: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC
amount: "10000000000", // $10,000 USDC
legs: [
{
tokenIn: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC
tokenOut: "0x4200000000000000000000000000000000000006", // WETH
tickSpacing: "100",
},
{
tokenIn: "0x4200000000000000000000000000000000000006", // WETH
tokenOut: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", // USDC
tickSpacing: "100",
},
],
});
// → { estimatedProfit, flashLoanFee, netProfit, isProfitable }Quick Start: Flash Arbitrage
How Flash Loans Work
Flash Loan Fee
FlashArbReceiver
How It Works
Pre-Flight Checks
AgentKit Actions Reference
Action
Description
Direct Contract Integration
Solidity Interface
Example Receiver
Python (via Credit REST API)
Use Cases
Use Case
Description
Example
Contract Addresses (Base Mainnet)
Contract
Address
Last updated
