Racira Calculator

Flash Loan Arbitrage Calculator

Flash Loan Arbitrage Calculator

$
$
$
%
Net Arbitrage Profit
+$327.72
ROI: +0.328% · Profitable after all fees · Break-even spread: +0.87%
Gross Sale Proceeds
$100,392.72
Total Fees
$602.08
ROI (per tx)
+0.328%

Transaction Breakdown

Flash Loan Amount$100,000
Buy Price (DEX A)$100.00
Sell Price (DEX B)$101.20
Gross Price Gap1.20%
Effective Buy Price (0.1% slippage)$100.10
Tokens Bought996
Gross Sale Proceeds$100,392.72
Trading Fees (both legs)−$602.08
Flash Loan Fee (0.05%)−$50.00
Gas Cost−$15.00
Net Arbitrage Profit+$327.72
ROI (per transaction)+0.328%
Break-Even Sell Price$100.87
Minimum Price Gap Needed+0.87%

Summary Statistics

Net Profit:+$327.72
Gross Proceeds:$100,392.72
Trading Fees:$602.08
Flash Loan Fee:$50.00
Gas Cost:$15.00
ROI:+0.328%
Tokens Bought:996
Break-Even Spread:+0.87%

What Is a Flash Loan Arbitrage?

Flash loan arbitrage is a decentralized finance strategy in which a trader borrows a large amount of capital without collateral, uses it to buy an asset on one exchange where it is priced lower, sells it on another exchange where it is priced higher, repays the loan plus its fee, and keeps the difference — all inside a single blockchain transaction. The innovation of the flash loan is atomicity: if the repayment cannot be completed, the entire transaction is reversed, so the lender never faces default and the borrower never faces a stranded position. In practice the strategy is executed by automated bots that monitor the prices of thousands of token pairs across dozens of decentralized exchanges, waiting for momentary price gaps large enough to clear the cost of the two swaps, the lender's fee, and gas. Because anyone can inspect the same pools, profitable gaps are usually captured within seconds — often within the same block in which they appear — which is why the economics shown by a calculator like this one represent the theoretical ceiling for a single trade rather than a guaranteed recurring income. This tool models the complete cash flow of one arbitrage cycle: the size of the loan, the two execution prices, the trading fee charged on each swap, the flash loan fee charged by the lender, the slippage caused by your own trade moving the pools, and the gas needed to settle the transaction.

How the Profit Is Calculated

The calculation follows the money through the transaction step by step. Slippage is applied first: because a large buy consumes liquidity in the cheaper pool, your effective buy price is the quoted price adjusted upward by your slippage estimate, and the effective sell price is adjusted downward on the other side. The trading fee on the buy leg is deducted from the loan before any tokens are purchased, so the number of tokens you acquire equals the loan amount minus the buy fee, divided by the effective buy price. Those tokens are then sold at the effective sell price, and the sell leg's trading fee is deducted from the proceeds, giving your gross sale proceeds. From those proceeds the calculator subtracts the original loan, the flash loan fee charged by the lender, and your gas cost. What remains is the net arbitrage profit. Because the loan itself is always repaid — the transaction reverts otherwise — the profit is what is left after every cost, and the return on the trade is expressed as ROI relative to the borrowed amount. The calculator also solves the strategy's critical question in reverse: given every cost you face, what sell price would make the trade exactly break even? That break-even price, shown as a minimum required price gap, tells you instantly whether an observed spread between two exchanges is worth acting on. The math deliberately assumes a single pair of venues with uniform fees; real arbitrage sometimes routes through several pools or uses more complex paths, which only raises the fee burden and the break-even spread.

Understanding Your Results

The headline number is the net arbitrage profit for one transaction, colored green when it is positive and red when the trade loses money. Next to it you see the return on the borrowed capital and the minimum price gap required to break even, which is the single most useful figure when you are scanning pools for opportunity: if the observed gap between two exchanges is smaller than that percentage, no loan size will make the trade profitable. The breakdown table traces every component of the cash flow — effective buy and sell prices, tokens acquired, gross proceeds, trading fees on both legs, the flash loan fee, and gas — so you can see exactly which cost is consuming your edge. The summary statistics condense the same numbers for a quick scan. The defaults describe a realistic scenario: a $100,000 loan, a token trading at $100.00 on one venue and $101.20 on another, 0.30% trading fees on each swap, a 0.05% flash loan fee, modest slippage, and $15 of gas. Move the sell price down toward the buy price and watch the trade flip to a loss at the break-even spread; move it up and the profit scales almost linearly with the gap. Use the advanced inputs to model your actual lender fee and network conditions, and remember that this calculator estimates the economics of a single isolated arbitrage — competition, mempool dynamics, and protocol risk determine whether that economics can ever be captured in practice.

Frequently Asked Questions

Related Calculators