evm_execute_flash_loan
Borrow uncollateralized assets from Aave, dYdX, Balancer, or Uniswap V3 to run arbitrage or liquidations, then repay in the same atomic transaction.
Instructions
Execute flash loan from Aave, dYdX, Balancer, or other providers.
Borrow large amounts without collateral, execute arbitrage/liquidations, repay in same transaction. Validates atomicity - transaction reverts if loan isn't repaid.
PARAMETERS:
chain: Target EVM chain
provider: Flash loan provider (aave, dydx, balancer, uniswapV3, etc.) - optional, auto-selects best
asset: Token address to borrow
amount: Amount to borrow in token units
callbackContract: Your contract that receives/repays loan
callbackData: Encoded data for callback (optional)
privateKey: Private key for signing
profitEstimate: Expected profit for cost analysis (optional)
FLASH LOAN PROVIDERS: • Aave: 0.09% fee, most chains • dYdX: 0% fee, Ethereum only • Balancer: 0% fee, select chains • Uniswap V3: 0.05-0.3% fee
ATOMICITY GUARANTEE: • Pre-flight gas estimation validates repayment • Transaction fails if callback doesn't repay • No risk of unpaid flash loans
Returns tx hash, fees paid, and profit analysis.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"asset": "<asset>",
"amount": "<amount>",
"callbackContract": "<callbackContract>",
"privateKey": "<privateKey>"
},
"name": "evm_execute_flash_loan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | Token address to borrow | |
| chain | Yes | ||
| amount | Yes | Borrow amount in token units | |
| provider | No | Flash loan provider (optional, auto-selects) | |
| privateKey | Yes | Private key for signing | |
| callbackData | No | Encoded data for callback | |
| profitEstimate | No | Expected profit in token units | |
| callbackContract | Yes | Contract that receives and repays loan |