{"id":107991,"date":"2021-01-11T00:11:24","date_gmt":"2021-01-11T00:11:24","guid":{"rendered":"https:\/\/precoinnews.com\/?p=107991"},"modified":"2021-01-11T00:11:24","modified_gmt":"2021-01-11T00:11:24","slug":"a-beginners-guide-to-cryptocurrency-triangular-arbitrage","status":"publish","type":"post","link":"https:\/\/precoinnews.com\/crypto\/a-beginners-guide-to-cryptocurrency-triangular-arbitrage\/","title":{"rendered":"A Beginners Guide to Cryptocurrency Triangular Arbitrage"},"content":{"rendered":"
Written by\u00a0Evan Francis, CEO & co-founder of\u00a0Coygo Inc. which provides tooling for professional cryptocurrency trading and insights. A cryptocurrency advocate since 2010, Evan has years of experience working as a software engineer in fintech before leaving his corporate job to pursue a full-time venture in the cryptocurrency and digital asset space.<\/p>\n
Most traders have heard of triangular arbitrage at one time or another, but do you really understand how it works and how you can use it as a tool in your trading toolbelt? <\/p>\n
In this guide we\u2019ll explain what cryptocurrency triangular arbitrage is and how you can identify opportunities yourself. With the right tools and determination anyone can be an arbitrageur!<\/p>\n
Triangular arbitrage is a trading technique that aims to profit off of a price discrepancy between three different assets on the same exchange. This is something that\u2019s been done for years in the forex markets and it can be applied to cryptocurrency markets as well.<\/p>\n
For example you could start with a balance in USD, buy BTC with that USD on a BTC-USD market, then buy LTC with that BTC on a LTC-BTC market, then finally sell that LTC for USD on a LTC-USD market. If the Bitcoin and Litecoin prices are aligned in your favor you will start and end with USD and gain some amount of USD in the process.<\/p>\n
Arbitrage that can be performed immediately can theoretically offer a low-risk opportunity for profit. This is because when it\u2019s done right you\u2019ll submit accompanying orders at the same time and immediately realize a profit (or loss) without having to wait on timing the market to try and make a profit by selling at the right moment.<\/p>\n
Triangular intra-exchange arbitrage in particular is appealing because it happens entirely on one exchange, unlike other inter-exchange arbitrage strategies that involve trading across multiple exchanges.<\/p>\n
Of course there are risks associated with arbitrage, particularly because you\u2019re competing with other traders (and trading bots) who are trying to race to act on an opportunity before others do. In general trading bots are very competitive and you\u2019ll want to use some sort of tooling that is capable of assisting with real-time analysis and submitting orders if you want to gain an edge over the competition.<\/p>\n
To find opportunities that are profitable we can do some math to determine if a cross-rate is overvalued, meaning that there is a price discrepancy when trading between three different assets that would result in a profit if our orders are performed correctly. Heads up, we\u2019re going to dive deep into the numbers here!<\/em><\/p>\n Orders can occur on two different order paths<\/strong>, both resulting in starting and ending with the same asset (USD in this example). We\u2019ll cover each separately since the math for each is a bit different. For each path we will calculate the cross-rate<\/strong>, and if the result is > 1 it is considered overvalued. This doesn\u2019t necessarily mean that it\u2019s profitable though, we have to account for trading fees that will be incurred on each filled order as well.<\/p>\n For the cross-rate to be profitable it must be greater than the sum of each trade\u2019s fees. In our example we\u2019re assuming each market has a 0.2% taker fee, so the cross-rate must be more than 1 + 0.002 + 0.002 + 0.002, or 1.006, for it to be profitable.<\/p>\n First let\u2019s define the following data points for this example:<\/p>\n Below are the two different order paths possible, and the accompanying cross-rate formulas:<\/p>\n First order path<\/strong><\/p>\n First order path cross-rate formula: <\/strong>(1 \/ \u201cTrade pair A\u201d ask) x (1 \/ \u201cTrade pair B\u201d ask) x (\u201cTrade pair C\u201d bid)<\/p>\n Second order path<\/strong><\/p>\n Second order path cross-rate formula<\/strong>: (1 \/ \u201cTrade pair C\u201d ask) * (\u201cTrade pair B\u201d bid) * (\u201cTrade pair A\u201d bid)<\/p>\n There are two big things to keep in mind when using this trading strategy: slippage, and market data precision requirements.<\/p>\n Slippage occurs when you get a worse price than expected for an order because you ended up filling multiple orders in the order book. For example let\u2019s say you want to buy BTC on the BTC-USD orderbook and it has an ask of 0.1 BTC at $20,000 then the next is for 0.2 BTC at $20,100. If you buy 0.15 BTC you\u2019ll end up getting the first 0.1 at a rate of $20,000, then the last 0.5 at a rate of $20,100. Because of this, if you want to avoid slippage you need to make sure that your order isn\u2019t greater than the size of the ask that you will fill, or asks in this case since triangular arbitrage will involve three different orders.<\/p>\n Data precision requirements are the number of decimal places that each market supports on an exchange for both order amounts and order rates. Exchanges create these limits so that you can\u2019t trade extraordinarily small amounts, and each trade pair on an exchange may allow a different number of decimal places. If an arbitrage opportunity arises that would require order amounts of 0.65201 BTC on two markets, but one market only allows three decimal places, you won\u2019t be able to submit those orders<\/p>\n Triangular arbitrage is mostly done by people who build their own custom trading bots because it\u2019s a complex topic and requires rapid calculations of real-time order book data to identify and react to opportunities in time. If you\u2019re comfortable with writing code each exchange provides access to real-time market data and allows managing orders with custom code.<\/p>\n Not an engineer? Luckily there is one solution that lets traders configure fully automated crypto triangular arbitrage bots without any coding knowledge required: Coygo Terminal, and anyone can start a trial for free! Coygo goes into great detail about how their triangular arbitrage bot strategy works in their announcement blog post.<\/p>\n Featured image via Unsplash.<\/em><\/p>\n The views and opinions expressed by the author are for informational purposes only and do not constitute financial, investment, or other advice.<\/em><\/p>\n\n
\n
\n
Things to keep in mind<\/h2>\n
Slippage<\/h3>\n
Data precision<\/h3>\n
What tools are available to help with cryptocurrency triangular arbitrage?<\/h2>\n