Flash loans let you borrow large amounts with no collateral, provided you repay within the same transaction. The catch is the fee plus gas, which sets a hard floor on how thin an arbitrage can be. This calculator shows the fee, the total repayment, and the exact spread you need to break even.
How it works
The protocol charges a fixed premium on the borrowed amount:
fee = amount × rate
total repayment = amount + fee
total cost = fee + gas
break-even % = total cost / amount × 100
net profit = amount × (target spread % / 100) − total cost
Rates used are the protocol defaults: Aave V3 at 0.05%, dYdX and Balancer V2 at 0%, and Uniswap V3 flash swaps at the 0.30% pool fee tier. Because the entire borrow plus fee must be repaid atomically, an unprofitable trade simply reverts and you only pay gas.
Example
Borrowing 100,000 USD on Aave V3 costs 100000 × 0.0005 = 50 USD in fees. Add 40
USD of gas and the total cost is 90 USD, so the break-even arbitrage spread is
90 / 100000 × 100 = 0.09%. A target spread of 0.5% yields 100000 × 0.005 − 90 = 410 USD net.
Tips and notes
Always add slippage and price impact on top of the break-even figure — real fills move the pool. Fee rates are governance parameters and Uniswap costs depend on the pool tier you route through, so confirm live values before sending the transaction.