DeFi Flash Loan Cost Calculator

Calculate Aave or dYdX flash loan fee for a given borrow amount

Enter a flash loan amount in USD and select a protocol such as Aave V3 at 0.05%, dYdX at 0%, or Uniswap V3 at 0.30% to compute the fee, total repayment, and the minimum arbitrage spread required for profitability after gas. For MEV bots and DeFi developers. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How much does an Aave flash loan cost?

Aave V3 charges a flash loan premium of 0.05% of the borrowed amount, so a 100,000 USD loan costs 50 USD in protocol fees. The full borrow plus the fee must be repaid in the same transaction or it reverts.

Flash loans let you borrow large sums with no collateral because the loan must be repaid within the same blockchain transaction. If the repayment does not happen, the entire transaction reverts as if the borrow never occurred. This atomicity is what makes them safe for protocols to offer — but the protocol fee plus gas costs create a hard floor on how thin an arbitrage can be. This calculator shows exactly what that floor is.

How it works

The protocol charges a flat premium on the notional borrowed amount. That fee, plus the gas cost of the transaction bundle, is your total cost. The break-even spread is the minimum price difference needed just to cover those costs:

protocol fee     = amount × fee_rate
total repayment  = amount + protocol_fee
total cost       = protocol_fee + gas_cost
break-even %     = (total_cost ÷ amount) × 100
net profit       = (amount × target_spread%) − total_cost

Protocol fee rates

ProtocolFlash loan feeNotes
Aave V30.05%Governance-adjustable premium
dYdX0.00%No protocol fee; gas only
Balancer V20.00%No protocol fee; gas only
Uniswap V30.30% (typical)Pool fee tier — varies by pool

The zero-fee protocols look attractive but Uniswap V3 flash swaps route through a pool with a real fee tier, so the effective cost depends on which pool you use (0.05%, 0.30%, or 1.00%).

Worked example

Borrowing 100,000 USD on Aave V3 with 40 USD estimated gas:

  • Protocol fee: 100,000 × 0.0005 = $50
  • Total cost: 50 + 40 = $90
  • Break-even spread: (90 ÷ 100,000) × 100 = 0.09%
  • Net profit at 0.5% target spread: (100,000 × 0.005) − 90 = $410

For a dYdX flash loan of the same size with 40 USD gas:

  • Protocol fee: $0
  • Break-even spread: (40 ÷ 100,000) × 100 = 0.04%
  • Net profit at 0.5%: 500 − 40 = $460

What this calculator does not model

  • Slippage and price impact: large trades move pool prices, especially in thinner markets. Your real spread narrows with every dollar of volume relative to pool liquidity.
  • MEV competition: if the arbitrage opportunity is visible on-chain, other bots may race to capture it, compressing the spread to zero or requiring tips to block builders.
  • Multi-hop routes: routing through multiple pools multiplies fees and slippage.
  • Failed transaction gas: a flash loan that reverts still consumes gas. The gas cost field should reflect the full bundle cost, not just the fee.

Always simulate the full route against live reserves before deploying capital. Fee rates are protocol governance parameters and may change; verify current rates in the protocol’s documentation before sending any transaction.