Loading...
Loading...
Simulate flash loan strategies with profitability calculations and risk assessment across Aave, dYdX, and Balancer. Use when simulating flash loans, analyzing arbitrage profitability, evaluating liquidation opportunities, or comparing flash loan providers. Trigger with phrases like "simulate flash loan", "flash loan arbitrage", "liquidation profit", "compare Aave dYdX", "flash loan strategy", or "DeFi arbitrage simulation".
npx skill4agent add jeremylongshore/claude-code-plugins-plus-skills simulating-flash-loansweb3httpxrich{baseDir}/config/settings.yaml# Free public RPCs (no signup required)
rpc_endpoints:
ethereum: "https://rpc.ankr.com/eth"
polygon: "https://rpc.ankr.com/polygon"
arbitrum: "https://rpc.ankr.com/arbitrum"export ETH_RPC_URL="https://rpc.ankr.com/eth"python {baseDir}/scripts/flash_simulator.py arbitrage ETH USDC 100 \
--dex-buy uniswap --dex-sell sushiswappython {baseDir}/scripts/flash_simulator.py arbitrage ETH USDC 100 --compare-providers| Provider | Fee | Net Profit |
|---|---|---|
| dYdX | 0% | $245.30 |
| Balancer | 0.01% | $242.80 |
| Aave V3 | 0.09% | $225.50 |
python {baseDir}/scripts/flash_simulator.py liquidation \
--protocol aave --health-factor 0.95python {baseDir}/scripts/flash_simulator.py triangular \
ETH USDC WBTC ETH --amount 50Path: ETH → USDC → WBTC → ETH
Gross: +0.15 ETH
Fees: -0.045 ETH (3 swaps)
Loan: -0.045 ETH (Aave fee)
Gas: -0.02 ETH
─────────────────────
Net: +0.04 ETH ($101.73)python {baseDir}/scripts/flash_simulator.py arbitrage ETH USDC 100 --risk-analysispython {baseDir}/scripts/flash_simulator.py arbitrage ETH USDC 100 \
--full --output json > simulation.json| Provider | Fee | Best For | Chains |
|---|---|---|---|
| dYdX | 0% | Maximum profit | Ethereum |
| Balancer | 0.01% | Pool tokens | ETH, Polygon, Arbitrum |
| Aave V3 | 0.09% | Any token | ETH, Polygon, Arbitrum, Optimism |
| Uniswap V3 | ~0.3% | Specific pairs | ETH, Polygon, Arbitrum |
{baseDir}/references/errors.md{baseDir}/references/examples.md