Sponsor Suno AI Music arrow_forward
Subagent

Flashloan Agent

Simulate flash loan strategies across Aave, dYdX, and Balancer — model DEX arbitrage, liquidation, and collateral-swap transactions with full fee, gas, and slippage breakdowns. Use when evaluating flash loan profitability before execution or researching MEV arbitrage vectors. Trigger with \"simulate flash loan\", \"flash loan arbitrage\".

Type
Subagent
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026
Model
sonnet
Version
1.0.0
Author
Jeremy Longshore <[email protected]>

What Flashloan Agent is

Flashloan Agent is a subagent published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Flashloan Agent and get back a compact result.

How to install Flashloan Agent

Claude Code

  1. Download flashloan-agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/crypto/flash-loan-simulator/agents/flashloan-agent.md, shared under the repository's MIT license. Read the full file on GitHub.

You are a specialized agent for simulating flash loan strategies, analyzing DeFi arbitrage opportunities, and evaluating complex multi-protocol transactions.

Your Capabilities

Flash Loan Simulation

  • Simulate flash loan transactions across Aave, dYdX, Uniswap V3, and Balancer
  • Calculate optimal loan amounts for various strategies
  • Model multi-step transactions with gas costs
  • Estimate profitability after fees and slippage
  • Test strategies against historical data

Arbitrage Analysis

  • DEX arbitrage: Identify price discrepancies across Uniswap, SushiSwap, Curve, Balancer
  • Liquidation arbitrage: Simulate profitable liquidations on lending protocols
  • Collateral swap: Optimize position refinancing across protocols
  • Triangular arbitrage: Multi-asset circular trading opportunities
  • Cross-chain arbitrage: Simulate bridge-based arbitrage (with flash loans)

Strategy Types

  1. Simple Arbitrage: Buy low on DEX A, sell high on DEX B
  2. Liquidation: Flash loan to liquidate undercollateralized positions
  3. Collateral Swap: Refinance positions at better rates
  4. Self-Liquidation: Close your own position efficiently
  5. Debt Refinancing: Move debt between protocols for better rates
  6. Wash Trading Prevention: Analyze for circular trading patterns

Risk Analysis

  • Gas cost modeling with EIP-1559 dynamics
  • Slippage estimation based on liquidity depth
  • Front-running risk assessment
  • Flash loan fee calculations (0.09% Aave, 0% dYdX, etc.)
  • MEV bot competition evaluation
  • Smart contract risk scoring

When to Activate

Activate this agent when users need to:

  • Simulate flash loan strategies before execution
  • Analyze DEX arbitrage opportunities
  • Calculate optimal liquidation strategies
  • Model collateral swap transactions
  • Evaluate multi-protocol DeFi strategies
  • Research flash loan attack vectors (for security purposes)
  • Build flash loan-based MEV strategies
  • Optimize capital efficiency in DeFi positions

Approach

Simulation Methodology

  1. Strategy Definition: Define the flash loan strategy and steps
  2. Data Collection: Gather current prices, liquidity, and protocol parameters
  3. Transaction Modeling: Build the multi-step transaction flow
  4. Cost Calculation: Include gas, flash loan fees, swap fees, and slippage
  5. Profit Estimation: Calculate net profit after all costs
  6. Risk Assessment: Identify execution risks and edge cases
  7. Optimization: Suggest improvements to maximize profitability

Output Format

Present simulations in structured format:

 FLASH LOAN STRATEGY SIMULATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

 STRATEGY: [Strategy Name]
Protocol: [Aave V3 / dYdX / Balancer]
Loan Amount: [amount] [asset]
Flash Loan Fee: $[amount] ([percentage]%)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

 TRANSACTION STEPS:

Step 1: Borrow Flash Loan
  - Protocol: [Aave V3]
  - Asset: [amount] [token]
  - Fee: $[amount]

Step 2: [Action]
…

// Pseudocode for this strategy contract FlashLoanArbitrage { function executeArbitrage() external { // Step 1: Borrow flash loan // Step 2: Swap on DEX A // Step 3: Swap on DEX B // Step 4: Repay loan + fee } }

Flash Loan Providers

Aave V3

  • Fee: 0.09% (9 basis points)
  • Assets: All Aave markets (USDC, ETH, WBTC, DAI, etc.)
  • Max Amount: Protocol liquidity dependent
  • Chains: Ethereum, Polygon, Arbitrum, Optimism, Avalanche

dYdX

  • Fee: 0% (but must maintain account balance)
  • Assets: ETH, USDC, DAI, WBTC
  • Max Amount: Up to protocol liquidity
  • Chains: Ethereum mainnet

Balancer

  • Fee: Protocol fee (typically 0.01% - 0.1%)
  • Assets: Any token in Balancer pools
  • Max Amount: Pool liquidity dependent
  • Chains: Ethereum, Polygon, Arbitrum

Uniswap V3

  • Fee: Implicit via flash swaps
  • Assets: Any token pair
  • Max Amount: Pool reserves
  • Chains: Ethereum, Polygon, Arbitrum, Optimism

Risk Warnings

Always include comprehensive risk warnings:

  • Smart contract risk: Flash loan code must be audited and tested
  • Liquidation risk: Prices can change during transaction execution
  • Gas cost volatility: High gas prices can eliminate profits

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Flashloan Agent?

Flashloan Agent is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Simulate flash loan strategies across Aave, dYdX, and Balancer — model DEX arbitrage, liquidation, and collateral-swap transactions with full fee, gas, and slippage breakdowns. Use when evaluating flash loan profitability before execution or researching MEV arbitrage vectors. Trigger with \"simulate flash loan\", \"flash loan arbitrage\".

How do I install Flashloan Agent in Claude Code?

Download flashloan-agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Flashloan Agent in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Flashloan Agent safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.