# NEO Arbitrage

### NEO Arbitrage

### NEO - Crypto Triangular Arbitrage

For 2023 we introduce a triangular arbitrage strategy to attempt to profit from potential differences between price conversions thanks to **NEO A.I.**

**NEO A.I** is an artificial intelligence algorithm created by NEO Tech Labs in June 2020 and which we tested and trained until December 2022. It is now ready to go to the consumer beta phase from the first quarter of 2023.

Triangular arbitrage is a commonly known technique for exploiting price differences between assets to try and make a quick and low-risk profit. If you’ve been wondering how triangular arbitrage works and how it applies to Bitcoin, Ethereum and other cryptocurrencies, you’re in luck! In this post will explain the basics of cryptocurrency triangular arbitrage, how to find triangular arbitrage opportunities, and some of the basic math behind calculating profits and orders.

### What is triangular arbitrage?

Triangular arbitrage involves trading between three different assets and exploiting price differences to try and make a profit. For example, if you have BTC you may buy ETH with BTC, then buy LTC with that ETH, then finally sell that LTC back to BTC. If the bid and ask rates of each trade pair (ETH-BTC, LTC-ETH and LTC-BTC) are right, there can be opportunity for a profit.

### How can I find crypto triangular arbitrage opportunities?

To find opportunities that are profitable you can do a bit of math to determine if a cross-rate is overvalued, meaning that there is a price discrepancy when trading between three different assets.

#### We will show by example, let’s define the following values:

Starting asset — USD (what we start with)

Trade pair A — BTC-USD

Trade pair B — LTC-BTC

Trade pair C — LTC-USD

Trading fees — In this example will assume that each trade pair has a 0.2% taker fee.

We will use the following order book data for this example, which shows the ask and bid for each trade pair:

#### There are two different *paths* we can use to trade:

*paths*we can use to trade:

**First path — Buy, Buy, Sell**

**Buy**on “Trade pair A”. We would start with USD, and buy BTC on BTC-USD using that USD.**Buy**on “Trade pair B”. We now have BTC, and we buy LTC with BTC on LTC-BTC.**Sell**on “Trade pair C”. We now have LTC, and we sell LTC for USD on LTC-USD, ending with a balance of USD again.

The formula to calculate the cross-rate formula for the **First path** is:

(1 / “Trade pair A” ask) x (1 / “Trade pair B” ask) x (“Trade pair C” bid)

If this cross-rate is > 1, it’s overvalued. If it’s > the sum of each trade pair’s trading fees it would be profitable. In this example, our trading fees are 0.2% on each pair so the cross-rate must be > 1.006. (0.2% is 0.002, so it’s 1 + 0.002 + 0.002 + 0.002).

**Second path — Buy, Sell, Sell**

**Buy**on “Trade pair C”. We would start with USD, and buy LTC on LTC-USD using that USD.**Sell**on “Trade pair B”. We now have LTC, and we sell LTC for BTC on LTC-BTC.**Sell**on “Trade pair A”. We now have BTC, and we sell BTC for USD on BTC-USD, ending with a balance of USD again.

The formula to calculate the cross-rate formula for the **Second path** is:

(1 / “Trade pair C” ask) * (“Trade pair B” bid) * (“Trade pair A” bid)

If this cross-rate is > 1, it’s overvalued. If it’s > the sum of each trade pair’s trading fees it would be profitable. In this example, our trading fees are 0.2% on each pair so the cross-rate must be > 1.006. (0.2% is 0.002, so it’s 1 + 0.002 + 0.002 + 0.002).

#### Finding the profitable order path

Using these formulas above, we can calculate the cross-rate of each path and we will get the following results which shows that the **First path** is profitable after trading fees.

### Accounting for slippage

We must also calculate the correct order amounts to avoid slippage. For example the first ask that you’ll be filling may only be for 0.5 BTC, so if you submit an order larger than that you’ll end up incurring slippage and not get the rate that you expected. This is a complex topic that we won’t be going into too deeply in this post, but basically it’s easiest to do the math for each trade pair’s ask and/or bid that you’ll be filling to figure out how much it’s value is in the Starting asset. For example, if the LTC-BTC ask you’re filling is 1.5 LTC you can figure out how much BTC that 1.5 LTC is equivalent to. Do this with each trade pair, and then find the smallest order size among the three orders and use that as your maximum order size since that’s the largest order you can submit without slippage.

### Why Triangular Arbitrage?

Cryptocurrency pricing is volatile. This is largely because one cannot generally take traditional investing concepts and apply them successfully. There are a large number of unclear factors that can influence a cryptocurrency’s price. Arbitrage methods, including Triangular Arbitrage, are relatively risk-free and attempt to ensure a profit regardless of many market conditions, and generally don’t need to be monitored as often as other riskier strategies.

Given the need for quick quotes and trade orders, a strategy like this can really only be implemented with A.I and API trading services - where My NEO Group excels.

Last updated