The Complete Guide to Crypto DEX Arbitrage and True Net Profit
A two-and-a-half percent price gap between Uniswap and SushiSwap looks like free money, but seasoned DeFi traders know the headline spread is a trap. By the time gas, trading fees, and slippage are paid, a gap that looked profitable can leave you in the red. This guide explains the math behind the cross-exchange arbitrage calculator above, how to read its Reality Check breakdown, and the real risks that make on-chain arbitrage far harder than it first appears.
How to Use This DEX Arbitrage Calculator
Start in the Trade Panel. Enter your Total Investment, the buy price of the token on the cheaper exchange (DEX A), and the sell price on the more expensive exchange (DEX B). Then move to the Hidden Costs Panel and enter your combined network gas fees in dollars, your total exchange trading fees as a percentage of the trade, and your estimated slippage as a percentage. Everything recalculates instantly as you type, with no submit button. The hero metric at the top shows your Net Profit after all fees, the Reality Check card itemizes every cost, and the status banner turns green when the spread covers your costs or red when slippage and gas would eat your entire margin.
The Arbitrage Math, Step by Step
The engine first divides your total investment by the buy price to find how many tokens you can buy. It multiplies that token count by the sell price to get the gross value on DEX B, then subtracts your investment to get the gross profit, which is the headline opportunity before any costs. Next it calculates the DEX trading fee as a percentage of the gross value and the slippage as a separate percentage of the gross value. It adds those two amounts to your fixed network gas fees to produce the Total Hidden Costs. Finally, it subtracts those total costs from the gross profit to reveal your Net Profit, and expresses that as a Net ROI by dividing by your investment. Every dollar figure is rounded to exact cents using floating-point-safe arithmetic so the numbers always add up.
A Worked Example
Suppose you invest $1,000, buy a token at $100.00 on DEX A, and sell at $102.50 on DEX B. You acquire 10 tokens whose gross value on DEX B is $1,025, for a gross profit of $25. Now apply the costs: a combined 0.60% trading fee on $1,025 is about $6.15, an estimated 0.50% slippage is about $5.13, and gas fees are $15.00, for total hidden costs near $26.28. Subtracting those from the $25 gross profit leaves a net loss of roughly $1.28, a negative net ROI. This is the lesson the calculator drives home: a 2.5% gross spread that looks attractive turns into a small loss once real-world costs are counted, which is exactly why so many beginner arbitrage attempts quietly lose money.
Why On-Chain Arbitrage Is Harder Than It Looks
Profitable spreads on liquid pairs are usually tiny and vanish in seconds because automated bots compete to close them. To overcome fixed gas costs you often need a large trade, but a large trade causes more slippage, which erodes the very profit you were chasing. Gas spikes during network congestion can turn a winning trade into a loser between the moment you see the opportunity and the moment your transaction confirms. And because the blockchain charges gas even for failed transactions, a string of reverted attempts can bleed your capital with nothing to show for it. The calculator above is designed to make these trade-offs visible before you risk a single dollar.
Reading the Status Banner and Reality Check
A green banner means your net profit is positive: the price spread is wide enough to cover all network and trading costs, leaving real take-home profit. A red banner means the trade is unprofitable, so slippage and gas fees would consume your entire margin and then some. The Reality Check card below the hero exists to teach a single hard truth: the gross profit at the top of the breakdown is almost never what you keep. Watch how the trading fee, slippage, and gas rows stack up against that gross figure, and you will quickly develop an instinct for which spreads are actually worth trading.