Aave V3 Flash Loans

Implement Aave V3 flash loans with Pool and IFlashLoanReceiver contracts.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/cyotee/aave-v3-skill --skill aave-v3-flash-loans
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Aave V3 Flash Loans
Source: https://github.com/cyotee/aave-v3-skill/tree/main/.opencode/skills/aave-v3-flash-loans
Command: npx skills add https://github.com/cyotee/aave-v3-skill --skill aave-v3-flash-loans

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides developers on implementing and understanding Aave V3 flash loans, including interaction patterns with Pool, IFlashLoanReceiver, and related contracts to enable borrowing and repayment within a single transaction.

Core Features & Use Cases

  • Flow overview: initiate flashLoan or flashLoanSimple and manage repayment or debt opening
  • Interfaces and contracts: IFlashLoanReceiver, IFlashLoanSimpleReceiver, FlashLoanLogic, Pool
  • Use cases: arbitrage, self-liquidation, collateral swaps, leveraged positions

Quick Start

Trigger a flash loan via Pool.flashLoan or Pool.flashLoanSimple, implement a receiver contract, and ensure the borrowed amount plus premium is repaid within the same transaction.

Frequently Asked Questions about Aave V3 Flash Loans

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement an Aave V3 flash loan in a smart contract?

Aave V3 flash loans are smart contract transactions that let you borrow and repay liquidity within a single block. They are used for arbitrage, self-liquidation, collateral swaps, and leveraged positions on Ethereum-compatible networks without requiring upfront capital.

What is the difference between flashLoan and flashLoanSimple in Aave V3?

FlashLoan allows borrowing multiple assets simultaneously and supports opening debt positions, while flashLoanSimple is streamlined for single-asset borrowing. Both require implementing specific receiver interfaces and managing the premium repayment within the same transaction.

How do flash loan premiums and debt modes work in Aave V3?

Flash loan premiums are fees added to the borrowed amount that must be repaid within the same transaction. Debt modes in Aave V3 allow you to open borrowed positions instead of repaying directly, managed through FlashLoanLogic and the Pool contract.

Can I use Aave V3 flash loans for collateral swaps and arbitrage?

Yes, Aave V3 flash loans support collateral swaps, arbitrage, self-liquidation, and leveraged positions. By interacting with Pool and IFlashLoanReceiver, developers can execute complex liquidity strategies and debt operations atomically on Ethereum-compatible networks.

Why does my Aave V3 flash loan transaction revert?

An Aave V3 flash loan reverts if the borrowed amount plus the premium is not repaid by the end of the transaction. Proper validation logic within the IFlashLoanReceiver implementation is required to ensure balances meet the protocol's repayment checks.