Flash Loan Arbitrage Calculator
Arbitrage Opportunity Calculator
Calculate your potential profit from flash loan arbitrage between two exchanges. Based on real DeFi use cases.
Results will appear here
Flash loans don’t require collateral. They don’t need a credit check. And they last less than 15 seconds. Yet, they’ve moved over $18 billion in value since 2020. How? Because they’re not meant to be borrowed like a bank loan. They’re a tool - a lightning-fast financial lever that only works if used perfectly in a single blockchain transaction.
What Exactly Is a Flash Loan?
A flash loan is a loan that starts and ends in one blockchain transaction. You borrow, say, $500,000 in DAI, use it to buy ETH on one exchange, sell it for more DAI on another, repay the loan plus a 0.09% fee, and keep the profit - all before the block is finalized. If any step fails, the whole thing reverses. No money leaves the system. No one loses anything except the gas fees you paid trying. It’s not magic. It’s code. And it only works because of how blockchains handle transactions: everything either happens completely, or not at all. This atomicity is what makes flash loans possible. You can’t do this in traditional finance. Banks take days to settle trades. Credit checks take weeks. Flash loans cut through all that.Arbitrage: The Most Common Use Case
About 52% of all flash loans are used for arbitrage. That means buying an asset cheap on one platform and selling it expensive on another - all in the same transaction. Here’s how it works in real life:- ETH is trading at $3,100 on Uniswap V3.
- On Balancer, the same ETH is priced at $3,125.
- You take a flash loan of $500,000 in DAI.
- You buy ETH on Uniswap using that DAI.
- You immediately sell that ETH on Balancer for more DAI.
- You repay the original DAI loan plus 0.09% fee.
- You pocket the difference - maybe $1,800.
Liquidations: Keeping DeFi Healthy
Another major use case - 26% of all flash loans - is liquidating undercollateralized loans. In DeFi, people borrow by locking up crypto as collateral. If the value of that collateral drops too much, their loan becomes unsafe. Protocols like Aave automatically trigger liquidations to protect lenders. But here’s the catch: to liquidate, you need to pay off the borrower’s debt. That means putting up cash - often tens or hundreds of thousands of dollars. Most people don’t have that kind of capital sitting around. Enter flash loans. A liquidator can:- Take a flash loan of $200,000 in USDC.
- Use it to pay off a borrower’s $195,000 debt on Aave.
- Receive the borrower’s collateral (say, 60 ETH) as a reward.
- Sell the 60 ETH on the open market for $208,000.
- Repay the $200,000 loan plus fee.
- Keep the $8,000 profit.
Collateral Swaps: Moving Assets Without Selling
Imagine you have 100 WETH locked in a lending protocol. You want to use it as collateral for a loan in USDC instead of ETH. But you don’t want to sell your ETH - you think it’ll go up. Traditional way? Sell ETH → get USDC → deposit USDC as collateral → wait 10 minutes. Flash loan way? Take a flash loan of 100 WETH → deposit it into the USDC lending pool → withdraw USDC → repay the WETH loan. Done in one transaction. No sale. No price risk. Just a swap. This is called a “collateral swap.” It’s used by advanced DeFi users to optimize their positions without triggering taxable events or market impact. It’s clean, fast, and efficient.Self-Collateralization: Borrowing to Boost Leverage
Some traders use flash loans to temporarily boost their borrowing power. Here’s how:- You have $100,000 in USDC as collateral on Aave. You can borrow up to $75,000 (75% LTV).
- You want to borrow $200,000 to buy more ETH.
- You take a flash loan of $125,000 in DAI.
- You deposit that DAI as additional collateral.
- Now your total collateral is $225,000 - enough to borrow $200,000.
- You borrow the $200,000, buy ETH, and immediately repay the flash loan.
Why Flash Loans Are Not for Everyone
Flash loans aren’t a get-rich-quick scheme. They’re a professional-grade tool. Here’s why most people fail:- You need to write or deploy smart contracts. That means knowing Solidity, testing on Goerli or Sepolia, and understanding reentrancy attacks.
- Gas costs can eat your profit. On Ethereum, a single flash loan costs $10-$30 in gas. If your arbitrage profit is $50, you’re barely breaking even.
- Competition is fierce. Bots run 24/7. If you’re not faster than them, you’re just paying for practice.
- Security risks are real. The Harvest Finance exploit in 2020 lost $30 million because of a flash loan-driven reentrancy bug.
Who’s Using Flash Loans - and Who’s Abusing Them?
Most flash loans are legitimate. Aave reports 78% are for arbitrage or liquidations. But 22% are malicious. Malicious uses include:- Price manipulation - flooding a DEX with fake trades to trigger liquidations.
- Flash loan attacks - borrowing millions to temporarily inflate token prices, then selling into the pump.
- Money laundering - moving funds across protocols to obscure origins.
The Future of Flash Loans
Flash loans aren’t going away. They’re evolving. Cross-chain flash loans are coming. Today, most happen on Ethereum. But by 2025, 40% of volume could come from Layer 2s like Polygon or Arbitrum, or even Bitcoin-based chains using wrapped assets. Zero-knowledge proofs could enable private flash loans - letting users execute strategies without exposing their trades to public mempools. Institutional interest is growing. Goldman Sachs filed a patent in February 2024 for a flash loan risk management system. That’s not a joke. Banks are learning how to use - and regulate - this tech. For now, flash loans remain a niche tool for experts. But they’ve proven something fundamental: blockchain can enable financial operations that were impossible before. No middlemen. No delays. No credit checks. Just code, speed, and capital efficiency. If you’re a developer, learn Solidity and test on a testnet. If you’re a trader, watch the DEX price spreads. If you’re just curious - understand that flash loans aren’t about borrowing money. They’re about moving it, faster than anything else in finance.Can anyone take a flash loan?
Technically, yes - any wallet can call a flash loan function. But practically, no. You need a smart contract that can execute complex logic in one transaction. That means coding in Solidity, testing thoroughly, and paying gas fees. Most retail users can’t do this without help.
How much can you borrow with a flash loan?
You can borrow up to 80% of the available liquidity in a lending pool. For example, if Aave’s DAI pool has $100 million, you can take a flash loan of up to $80 million. But the bigger the loan, the harder it is to execute without moving the market - and the higher the risk of failure.
Are flash loans illegal?
No, flash loans themselves are not illegal. But how you use them can be. Manipulating prices, laundering money, or exploiting protocol bugs can violate securities or anti-fraud laws. Regulators like the SEC and FATF are already targeting abusive flash loan activity.
Do flash loans work on all blockchains?
Flash loans are available on Ethereum, Polygon, Avalanche, Arbitrum, and other EVM-compatible chains. Each chain has its own lending protocols - Aave, Balancer, and Uniswap all support them. Non-EVM chains like Solana or Cosmos are developing similar tools, but they’re not as mature yet.
How much does a flash loan cost?
The fee is usually 0.09% on Aave and 0.3% on Balancer. But the real cost is gas - typically $10-$30 per transaction on Ethereum. If you’re doing arbitrage, your profit must cover both the fee and gas. Many small trades fail because gas spikes.
What’s the difference between a flash loan and a flash swap?
A flash loan lets you borrow any asset - DAI, ETH, USDC - and repay in the same asset. A flash swap (used by Uniswap) lets you swap one token for another without borrowing. You take ETH, give back DAI - no repayment needed because you’re exchanging, not borrowing. Flash swaps are simpler but less flexible.
Wendy Pickard
Flash loans are fascinating, but I still can't shake the feeling that they're like playing Jenga with the financial system. One wrong move and everything collapses - and someone else pays the price.
Jeana Albert
Oh please. This is just rich people’s casino with extra steps. You think some guy in his basement with a bot is ‘optimizing capital efficiency’? He’s just stealing from the next guy who didn’t code fast enough. And now regulators are coming. Enjoy your $2.1M fine, genius.
Natalie Nanee
It’s not about legality - it’s about ethics. You’re using the system’s own rules to exploit its weaknesses. That’s not innovation. That’s gaming. And if you’re proud of it, you’ve already lost the moral high ground. This isn’t finance - it’s digital looting.
Angie McRoberts
Wow. So you’re telling me the entire DeFi ecosystem runs on bots that make $8,000 in 12 seconds… and then disappear? That’s not efficiency. That’s a ghost town with a fancy website. Also, gas fees are the real villain here. Poor guy lost $87 to make $63. That’s not trading. That’s donating to Ethereum.
Chris Hollis
Arbitrage works if you’re fast. Everyone else pays gas. That’s it. No more no less. Also why are we still on Ethereum? L2s exist. Move on.
Diana Smarandache
Flash loans represent a paradigm shift in financial architecture - a radical departure from centralized intermediation. Their atomic execution model enables unprecedented capital velocity. However, the absence of regulatory oversight renders them vulnerable to systemic abuse. The SEC’s recent enforcement action is not punitive - it is prophylactic.
Allison Doumith
Think about it - flash loans are the financial equivalent of time travel. You borrow from the future to profit in the present, and if you fail, the universe just undoes it like nothing happened. No consequences. No accountability. Just pure, cold logic. Is that freedom? Or are we just building a temple to entropy?