Flash Loan Calculator
Calculate arbitrage profit and flash loan fees
Trade Setup
How much you want to borrow
Flash loan provider
Price on exchange A
Price on exchange B
Estimated transaction gas fee
Expected slippage on swaps
Flash Loan Strategies
Simple Arbitrage Win
Borrow $100k. ETH at $2000 on Uniswap, $2020 on Sushiswap. Buy 50 ETH, sell for $101k. Gross: $1k. Aave fee: $90. Gas: $150. Slippage: $300. Net: $460. Clean profit in one transaction.
Failed Trade
Borrow $50k. Price gap $5. Gross: $250. Fee: $45. Gas: $200. Slippage: $150. Net: -$145 loss. Transaction reverts. Lost gas fee. Price gap too small. Need $8+ gap to break even.
Liquidation Profit
Borrow $500k. Liquidate underwater position. Get 10% bonus. Repay debt $450k. Gross: $50k. Fee: $450. Gas: $300. Net: $49,250. Big wins on liquidations. Monitor health factors.
Collateral Swap
Borrow $200k. Repay DAI loan. Withdraw ETH collateral. Swap to USDC. Deposit USDC. Borrow DAI again. Repay flash loan. Changed collateral type. Fee: $180. Gas: $250. Total cost: $430.
Multi-Hop Arb
Borrow $1M. ETH→WBTC→USDC→ETH across 3 DEXs. Each hop 0.5% gain. Total: 1.5% = $15k gross. Fee: $900. Gas: $400. Slippage: $3k. Net: $10,700. Complex but profitable with size.
Self-Liquidation
Your position near liquidation. Borrow $300k. Repay your loan. Withdraw collateral. Avoid 10% liquidation penalty. Fee: $270. Gas: $200. Saved: $30k penalty. Smart move when health factor drops.
Flash Loan FAQ
What's a flash loan?
Borrow millions with zero collateral. Must repay same transaction. If can't repay, reverts. Used for arb and liquidations.
How much does it cost?
Aave: 0.09%. Balancer: 0%. Plus gas $50-500. Borrow $1M on Aave = $900 fee + gas.
Can I lose money?
Only gas if trade fails. Transaction reverts if unprofitable. But you lose gas fee. Test carefully first.
How to find opportunities?
Monitor price differences across DEXs. Watch liquidation bots. Track on-chain arb. Use APIs and bots.
Minimum profit needed?
Cover fee + gas + slippage. Usually $200+ to be worth it. Bigger loans = better % returns.
Which protocol best?
Aave: most liquidity. Balancer: 0% fee. dYdX: discontinued. Start with Aave for reliability.
Need coding skills?
Yes. Write Solidity smart contract. Handle callbacks. Test on testnet. Not for beginners. High technical barrier.
Competition level?
Very high. MEV bots dominate. Need fast execution. Opportunities disappear in seconds. Requires automation.
No comments yet. Be the first to share your thoughts!