---
title: "Crypto arbitrage explained: price gaps, costs and the stack · CloudSat"
description: "How crypto arbitrage works across exchanges, currency triangles and futures basis, why price gaps shrink after costs, and what an arbitrage bot runs on."
url: https://cloudsat.io/learn/crypto-arbitrage-costs-and-infrastructure
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Trading and crypto](https://cloudsat.io/learn/topic/trading)

# Crypto arbitrage explained: price gaps, costs and the stack

How crypto arbitrage works across exchanges, currency triangles and futures basis, why price gaps shrink after costs, and what an arbitrage bot runs on.

CloudSat team November 18, 2026 6 min read

Arbitrage means buying an asset where it is cheaper and selling it where it is dearer at the same moment, so that the result does not depend on where the price goes next. Crypto makes the gaps easy to see: the same coin trades on dozens of venues, each with its own order book. Turning a visible gap into a completed trade is another matter. Fees, transfers, slippage and timing absorb much of it, and what remains is exposed to operational and counterparty risk. This guide explains the main types, the cost stack and the infrastructure behind an arbitrage bot. It does not recommend any bot or suggest that arbitrage pays.

## Four kinds of crypto arbitrage

| Type | What it trades | Where the gap comes from | Main risk |
| --- | --- | --- | --- |
| Cross-exchange | The same asset, bought on one venue and sold on another | Fragmented liquidity, local demand, slow transfers | Transfers, withdrawal freezes, capital split across venues |
| Triangular | A loop of three pairs on a single venue, for example USDT into BTC, BTC into ETH, ETH back into USDT | Cross rates that disagree for a moment | Three legs to fill in time, three fees to pay |
| Spot and futures basis | Spot bought, futures or perpetual sold against it | The futures premium or the funding rate | Funding changes, liquidation of the short leg |
| Decentralized against centralized | A token on an on-chain exchange and on a centralized venue | On-chain pool prices lagging | Network fees, front-running bots, smart-contract risk |

Statistical arbitrage, trading two related assets on the expectation that their usual relationship returns, borrows the name but is not arbitrage in the strict sense: it is a bet that a pattern holds.

## Triangular arithmetic

Suppose these quotes on one venue, and 10,000 USDT to start:

| Step | Trade | Price | Result |
| --- | --- | --- | --- |
| 1 | Buy BTC with USDT | 60,000 | 0.166667 BTC |
| 2 | Buy ETH with BTC | 0.05 | 3.333333 ETH |
| 3 | Sell ETH for USDT | 3,010 | 10,033.33 USDT |

The loop shows a gross gain of 0.33%. At a hypothetical taker fee of 0.10% on each of the three legs, the result drops to about 10,003.26 USDT, a gain of 0.03%. And the prices above hold only for the quantity shown at the best level of each book; a larger order walks deeper into the book and pays worse prices. A gap that looks generous on a ticker can be gone after fees and depth, before speed even comes into it.

## How the basis trade works

A perpetual future never expires. Instead, periodic funding payments pull its price toward spot: when the perpetual trades above spot, long positions pay short ones, and the reverse when it trades below. A position that is long spot and short the same amount of perpetual has little exposure to the price itself, and it receives funding while funding is positive and pays while it is negative. Dated futures work differently: their premium over spot shrinks to zero at expiry. Either way the result depends on rates that change, and on keeping both legs alive.

## The cost stack

Every arbitrage pays some or all of these:

- **Trading fees** on every leg, usually at taker rates, because waiting for a resting order to fill reintroduces price risk.
- **Spread and slippage**, set by order book depth at the size you trade.
- **Withdrawal and network fees** when coins move between venues.
- **Transfer time.** The receiving exchange credits a deposit only after its required confirmations, and prices move in the meantime.
- **Funding and borrowing** in basis trades, paid or received at each funding interval, many venues settling every eight hours.
- **Stablecoin conversion.** USDT, USDC and fiat balances are not always exchangeable one for one.
- **Idle capital.** Most cross-exchange setups hold inventory on both venues and rebalance later instead of moving coins for each trade, so capital sits split across exchanges.

## Why some gaps persist

On liquid pairs, many automated participants watch the same books, and small gaps close quickly. A gap that stays open usually has a reason: deposits or withdrawals of that coin are suspended on one venue, its network is congested, one side has little real depth, access is restricted to some regions, or a stablecoin is trading away from its peg. The price is visible, but the trade behind it may not be available to you.

## Risks beyond the costs

- **Leg risk.** One side fills and the other does not, because of a partial fill, a rejected order or an API outage. You then hold an unhedged position you never meant to take.
- **Counterparty risk.** Exchanges have frozen withdrawals and failed outright, taking customer balances with them. Inventory spread over several venues is exposed to each one.
- **Liquidation.** In a basis trade, the short futures leg can be liquidated in a sharp spike even though the spot leg gained, especially when the two legs sit on different exchanges and cannot share collateral.
- **Account and API limits.** Withdrawal limits, compliance holds and per-IP rate limits can stop a strategy at the worst moment.

## The infrastructure behind an arbitrage bot

An arbitrage bot is a market data system first. It keeps a local copy of each venue's order book, built from a snapshot and kept current from WebSocket updates, and it trades only while every copy is fresh. A stale book on one side turns arbitrage into guessing.

Latency matters when gaps are contested. Exchanges run their matching engines in specific locations that are not always published, so measure instead: time the connection to each venue's API from each candidate server.

```bash
# Connect and first-byte times to an exchange API, five samples
for i in 1 2 3 4 5; do
  curl -o /dev/null -s -w '%{time_connect} %{time_starttransfer}\n' https://api.exchange.example/api/v3/time
done

# Signed requests carry timestamps, so the clock must be synchronized
chronyc tracking | grep -E 'System time|Leap status'
```

CloudSat's [High Frequency VPS](https://cloudsat.io/high-frequency-vps) plans run on Ryzen cores at 4.2 GHz or more and bill by the hour, so you can run that test from several regions and keep the one that measures best.

Key handling needs extra thought because rebalancing involves withdrawals. Keep trading keys trade-only and locked to your server's IP address. Where an exchange supports a withdrawal address allowlist, enable it, so funds can only ever go to addresses you own, and consider leaving withdrawals manual. The general rules for keys, rate limits and restarts are in [running a crypto trading bot safely](https://cloudsat.io/learn/run-a-crypto-trading-bot-safely-on-a-server).

Finally, monitor what can go wrong quietly: inventory drifting toward one venue, legs that failed, books that stopped updating and rate-limit headers that approach their ceiling.

## FAQ

### Is crypto arbitrage risk-free?

No. The textbook version is, but real trades carry fees, slippage, transfer delays, leg risk and the risk of an exchange failing while it holds your funds.

### Do arbitrage bots make money?

Nobody can promise that. Visible gaps on liquid pairs are contested by many automated traders, and whether anything remains after costs depends on fees, speed and access that differ for every participant.

### Why not buy on one exchange and withdraw to sell on the other?

You can, but the coins are in transit for the confirmations the receiving exchange requires, and the price can move against you meanwhile. That is why most setups keep inventory on both sides and rebalance separately.

### Does server location matter for arbitrage?

For gaps that many bots chase, yes, and the only reliable guide is measurement from candidate locations to each exchange's API. For slower opportunities, such as funding-rate differences, location matters far less than costs and risk controls.

*Crypto prices are volatile and trading involves risk of loss. Nothing in this article is financial advice.*

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Trading and crypto](https://cloudsat.io/learn/topic/trading)

- [Run a crypto trading bot safely: keys, limits, failures](https://cloudsat.io/learn/run-a-crypto-trading-bot-safely-on-a-server): Trading and crypto Run a crypto trading bot safely: keys, limits, failures 8 min read
- [Grid trading bots: how the grid works and where it breaks](https://cloudsat.io/learn/grid-trading-bots-how-the-grid-works): Trading and crypto Grid trading bots: how the grid works and where it breaks 6 min read
- [Masternode hosting on a VPS: collateral, keys and uptime](https://cloudsat.io/learn/masternode-hosting-on-a-vps): Trading and crypto Masternode hosting on a VPS: collateral, keys and uptime 6 min read
- [Forex robots vs crypto bots: two ways to automate trading](https://cloudsat.io/learn/forex-robots-vs-crypto-bots): Trading and crypto Forex robots vs crypto bots: two ways to automate trading 7 min read
