Triangular Stablecoin Arbitrage: How to Profit on a Single Exchange
Detailed walkthrough of triangular arbitrage using USDT, USDC, and DAI, including calculations, order routing, and automated execution scripts.
Triangular Stablecoin Arbitrage: How to Profit on a Single Exchange
Triangular arbitrage is a classic technique that exploits price differences among three trading pairs. When the pairs involve stablecoins such as USDT, USDC, and DAI, the strategy can be executed with minimal exposure to volatility. This guide provides a step‑by‑step walkthrough of triangular stablecoin arbitrage on a single exchange, complete with calculations, order‑routing logic, and a blueprint for automated scripts.
---
Table of Contents
1. [Understanding the Mechanics of Triangular Arbitrage](#understanding-the-mechanics)
2. [Why Stablecoins Reduce Risk in Arbitrage Trades](#why-stablecoins-reduce-risk)
3. [Identifying Profitable Triangles on One Exchange](#identifying-profitable-triangles)
4. [Calculating Expected Returns and Transaction Costs](#calculating-returns)
5. [Order Routing and Execution Sequence](#order-routing)
6. [Automating the Process with Scripts and APIs](#automating)
7. [Risk Management and Monitoring](#risk-management)
8. [When to Use a Dedicated Arbitrage Scanner](#when-to-use-scanner)
9. [Frequently Asked Questions](#faq)
---
Understanding the Mechanics of Triangular Arbitrage <a name="understanding-the-mechanics"></a>
Triangular arbitrage involves three legs that start and end with the same asset. The trader converts Asset A into Asset B, then Asset B into Asset C, and finally Asset C back into Asset A. If the product of the three exchange rates exceeds 1 (after accounting for fees), the trader captures a risk‑free profit.
Mathematically, the condition for profitability is:
`
Rate_AB × Rate_BC × Rate_CA > 1 + Total_Fee_Ratio
`
Where each rate is the quoted price for the corresponding market, and the fee ratio includes taker fees, maker rebates, and network transaction costs.
In a stablecoin triangle, the assets are USDT, USDC, and DAI. The three pairs typically available on a cryptocurrency exchange are:
- USDT/USDC
- USDC/DAI
- DAI/USDT
If the market quotes deviate from the theoretical “1‑to‑1” peg, the triangle can generate a measurable spread.
---
Why Stablecoins Reduce Risk in Arbitrage Trades <a name="why-stablecoins-reduce-risk"></a>
Stablecoins are designed to track the value of a fiat currency, usually the U.S. dollar. Their price stability means that short‑term price swings are minimal compared to volatile assets such as Bitcoin or Ether.
- Limited Market Volatility – The price of USDT, USDC, and DAI rarely deviates more than 0.5 % from the $1 benchmark over a 24‑hour window. This tight band reduces exposure to adverse price movement during execution.
- Predictable Fee Structure – Most exchanges charge a flat taker fee (e.g., 0.04 %). Because the underlying asset does not fluctuate dramatically, fee calculations remain consistent across the three legs.
- Higher Liquidity – The three largest stablecoins together represent more than $30 billion in daily trading volume across major spot markets. High liquidity ensures that large order sizes can be filled without significant slippage.
- Regulatory Acceptance – Stablecoins such as USDC and USDT have secured compliance certifications from reputable custodians. The lower regulatory risk encourages institutional participation, which further stabilizes the market.
These attributes enable traders to focus on pure price differentials rather than managing directional risk.
---
Identifying Profitable Triangles on One Exchange <a name="identifying-profitable-triangles"></a>
1. Pull Real‑Time Quotes
Use the exchange’s public WebSocket or REST endpoint to retrieve the best bid and ask for each pair. Example JSON payload (simplified):
`json
{
"USDT_USDC": { "bid": 0.9995, "ask": 1.0003 },
"USDC_DAI": { "bid": 1.0001, "ask": 1.0010 },
"DAI_USDT": { "bid": 0.9998, "ask": 1.0006 }
}
`
2. Compute the Implied Cross Rate
The implied cross rate for USDT → USDC → DAI → USDT is obtained by multiplying the ask price of the first leg, the ask price of the second leg, and the bid price of the final leg.
`
Implied_Cross = Ask_USDT/USDC × Ask_USDC/DAI × Bid_DAI/USDT
`
If the implied cross exceeds 1 after fees, a trade is viable.
3. Apply a Minimum Threshold
Professional traders often set a profitability threshold of 0.1 % to cover hidden costs such as latency, order‑book depth, and occasional fee variations.
`
Profitability = (Implied_Cross – 1) – Total_Fee_Ratio
`
Only triangles with profitability greater than 0.001 (0.1 %) are considered actionable.
4. Validate Order‑Book Depth
Check the cumulative volume available at the quoted prices. For a $100,000 trade, the order book must contain at least that amount on each side of the three pairs.
5. Record the Opportunity
Log the timestamp, the three quoted rates, the calculated profitability, and the available depth. A simple SQLite table can hold this data for later analysis.
---
Calculating Expected Returns and Transaction Costs <a name="calculating-returns"></a>
Example Trade
Assume the following market data (all prices are quoted in US dollars):
| Pair | Ask | Bid |
|---------------|-------|-------|
| USDT/USDC | 1.0003| 0.9995|
| USDC/DAI | 1.0010| 1.0001|
| DAI/USDT | 1.0006| 0.9998|
The trader starts with $100,000 USDT.
Step 1 – USDT → USDC
`
USDT_to_USDC = $100,000 ÷ Ask_USDT/USDC
= $100,000 ÷ 1.0003
= 99,970.01 USDC
`
Step 2 – USDC → DAI
`
USDC_to_DAI = 99,970.01 ÷ Ask_USDC/DAI
= 99,970.01 ÷ 1.0010
= 99,870.14 DAI
`
Step 3 – DAI → USDT
`
DAI_to_USDT = 99,870.14 × Bid_DAI/USDT
= 99,870.14 × 0.9998
= 99,850.17 USDT
`
Gross Profit Before Fees
`
Gross_Profit = 99,850.17 – 100,000
= –$149.83
`
The negative gross profit indicates that the raw price spread does not cover fees.
Incorporating Fees
Assume a taker fee of 0.04 % per leg. The total fee multiplier is:
`
Fee_Multiplier = (1 – 0.0004)^3 ≈ 0.9988
`
Applying the multiplier to the final amount:
`
Net_USDT = 99,850.17 × 0.9988 = 99,730.22
Net_Profit = 99,730.22 – 100,000 = –$269.78
`
In this scenario, the triangle is not profitable.
Finding a Positive Example
Suppose the asks shift slightly due to market pressure:
- Ask_USDT/USDC = 0.9988
- Ask_USDC/DAI = 0.9985
- Bid_DAI/USDT = 1.0015
Re‑run the calculation:
`
USDT_to_USDC = 100,000 ÷ 0.9988 = 100,120.24 USDC
USDC_to_DAI = 100,120.24 ÷ 0.9985 = 100,274.68 DAI
DAI_to_USDT = 100,274.68 × 1.0015 = 100,425.00 USDT
`
Gross profit: $425.00.
Apply fees:
`
Net_USDT = 100,425.00 × 0.9988 = 100,284.30
Net_Profit = 100,284.30 – 100,000 = $284.30
`
The net profit of $284.30 corresponds to a 0.284 % return on capital, which exceeds a typical 0.1 % threshold.
Transaction Cost Checklist
| Cost Type | Typical Value | Impact on Triangle |
|--------------------------|---------------|--------------------|
| Taker Fee (per leg) | 0.04 % | Reduces net profit |
| Maker Rebate (optional) | –0.02 % | Can offset taker fees if limit orders are used |
| Network Gas (Ethereum) | $1–$5 per transaction | Negligible for $100k scale |
| Withdrawal/Deposit Fee | Varies by exchange | Relevant only for cross‑exchange arbitrage |
| Slippage | 0.01 %–0.05 %| May erode thin spreads |
By continuously monitoring each component, a trader can maintain the profitability envelope.
---
Order Routing and Execution Sequence <a name="order-routing"></a>
1. Pre‑Check Liquidity
Before submitting any order, query the depth of each order book at the desired price level. Use the exchange’s GET /orderbook?symbol=USDT_USDC&limit=100 endpoint. Verify that the cumulative volume at the ask price meets or exceeds the intended trade size.
2. Submit the First Market Order
Because triangular arbitrage is time‑sensitive, the fastest execution is achieved with market orders. Submit a market sell order for USDT/USDC. Record the exact execution price returned by the exchange.
3. Adjust Subsequent Orders Based on Fill Price
The actual fill price of the first leg may differ from the quoted ask due to liquidity depth. Re‑calculate the required amount of USDC for the second leg based on the realized USDC balance.
4. Place the Second Market Order
Execute a market sell order on USDC/DAI. Again, capture the execution price.
5. Final Market Order
Execute a market buy order on DAI/USDT using the DAI balance obtained from the second trade.
6. Verify End‑Of‑Cycle Balance
After the third order, query the account balance for USDT. Compare the final USDT amount with the initial balance. The net difference is the realized profit (or loss).
7. Record the Trade Log
Store the following fields in a persistent ledger:
- Timestamp (ISO 8601)
- Executed price for each leg
- Quantity filled for each leg
- Fees charged per leg
- Net profit in USDT and percentage
Maintaining a detailed audit trail enhances transparency and enables post‑trade analytics.
---
Automating the Process with Scripts and APIs <a name="automating"></a>
A manual
Related guides
- Automated Triangular Arbitrage Trading: Tools and Strategies
- Best Exchanges for Triangular Arbitrage in Crypto (2026)
- Best Triangular Arbitrage Calculators and Tools for 2026
- Best Triangular Arbitrage Calculators and Tools in 2026
- Best Triangular Arbitrage Calculators and Tools
- Build Your Own Crypto Triangular Arbitrage Tool with Python and Binance API
All guides · Coins · Exchanges