aave_flash_loan
Construct a multi-asset Aave V3 flash loan transaction by defining the receiver contract, tokens, amounts, interest rate modes, and debt assignment for same-transaction repayment or variable debt.
Instructions
Build a multi-asset flash loan transaction. The receiver contract must implement IFlashLoanReceiver. interestRateModes: 0 = repay in same tx, 2 = open variable debt.
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>",
"receiverAddress": "<receiverAddress>",
"assets": "<assets>",
"amounts": "<amounts>",
"interestRateModes": "<interestRateModes>",
"onBehalfOf": "<onBehalfOf>"
},
"name": "aave_flash_loan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Target chain | |
| assets | Yes | Array of token addresses to borrow | |
| params | No | Arbitrary bytes to pass to the receiver callback (hex-encoded) | 0x |
| amounts | Yes | Array of amounts in human-readable units, matching assets order | |
| onBehalfOf | Yes | Address that will incur debt if interestRateMode != 0 | |
| receiverAddress | Yes | Contract that will receive the flash loan and execute the callback | |
| interestRateModes | Yes | Per-asset: 0 = no debt (repay same tx), 2 = open variable debt |