flash-loan-usage

Generate Solidity flash loan receiver templates for Aave, Uniswap, and Balancer.

120|12|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ccashwell/evm-cortex --skill flash-loan-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flash-loan-usage
Source: https://github.com/ccashwell/evm-cortex/tree/main/skills/flash-loan-usage
Command: npx skills add https://github.com/ccashwell/evm-cortex --skill flash-loan-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates guidance and templates for implementing flash loan strategies across DeFi protocols, reducing guesswork and integration time.

Core Features & Use Cases

  • Aave V3 flash loan receiver templates with safe executeOperation
  • Multi-asset flash loan patterns and receiver scaffolds for arbitrage, liquidation, and collateral swaps
  • Quick-start examples and integration guidance for Solidity projects

Quick Start

Provide a target asset, amount, and action (arbitrage, liquidation, or collateral swap) to generate a ready-to-deploy flash loan receiver and usage steps.

Frequently Asked Questions about flash-loan-usage

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

FAQPage Schema
How do I implement a flash loan receiver contract in Solidity for Aave V3?

To implement a flash loan receiver in Solidity, use a template with a safe executeOperation function, ownership checks, and safety validations to process borrowed assets and repay within the same transaction.

What's the best way to structure a collateral swap using flash loans?

Structure a collateral swap by borrowing assets via a flash loan, repaying existing debt, withdrawing original collateral, swapping it, and redepositing the new collateral before repaying the loan.

Do I need to write safety validations for Uniswap and Balancer flash loan patterns?

Yes, robust flash loan patterns require safety validations including ownership checks and strict slippage controls to ensure profitable execution and prevent unauthorized calls across DeFi protocols.

How do flash loan strategies handle repayment and fee validation automatically?

Flash loan strategies handle repayment by validating that the borrowed amount plus fees is returned to the protocol within the same transaction, reverting the entire operation if the balance check fails.