...because every currency deserves liquidity.
Bids | Asks | ||
---|---|---|---|
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Bids | Asks | ||
---|---|---|---|
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Bids | Asks | ||
---|---|---|---|
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Price | Volume | Volume | Price |
Arbytes is the name of my first fully operational quantitative trading strategy. It was my first bot.
Arbytes made 15,623.54CAD in 2019.
Throughout 2019, Arbytes operated fully autonomously as a liquidity provider for crypto-currencies. It trades on 4 different exchanges across 8 different cryptos.
Profit/Loss (CAD) | 15,623.54 |
Profit/Loss (%) | 27.94 |
Start Date | December 31st, 2018 |
End Date | December 15th, 2019 |
Arbytes implements a triangular arbitrage trading strategy across a matrix of crypto-currency pairs. It is watching the order books of each currency pair and comparing the bids & offers across set of pairs which create triangular arbitrage trading patterns. Limit orders are posted to illiquid pairs at prices where their execution could trigger liquidity taking trades on the other two pairs while still retaining a modest profit.
The term “synthetic pair” will represent a set of pairs that can be traded through to capture a triangular arbitrage opportunity. For example, ETH/BTC has the Ripple synthetic pair (XRP/ETH, XRP/BTC).
Arbytes populates a matrix of synthetic pairs based on the available liquidity across all avenues. Now, with a matrix of best pricing (see orderbooks), it solves a pathfinding problem to determine the best possible spreads to provide each pair. Orders are then fired to exchanges at the appropriate prices.
Once an order is filled two other trades fire in tandem to complete the trade and remove the assigned risk. The orders are set to ensure that a profit can be made as long as the subsequent trades are filled within reasonable time and at a minimal distance from the advertized price at the time of the original order's execution.
Arbytes is scalable. In 2019, Arbytes added 3 new currencies and an entire exchange with less than an hour of down time and only a 2% increase in code size. See what we did in 2019.
The Arbytes of 2017 was very different. I wasn’t early to get on the BTC train but I wasn’t late. I made my first purchase in 2011 and again in 2013 with very small sums. When 2017 arrived I had already taken interest in equity markets, and with my love of software my investments had a destiny. A trading robot.
I first read the term “arbitrage” when reading Micheal Lewis’s book, Flash Boys in 2014. Back then, High Frequency Traders (HFTs) were getting really cuddily (literally, they were trying to get as close as possible!) with the exchanges to earn as little as half a cent (0.005) per share! They also had to get really fast, some even tried FPGA fast. The whole point of getting so close and going so fast? To steal nano-seconds away from other HFTs for those sweet sweet half-pennies. What made those half-pennies so sweet? Arbitrage, “Risk-Free” trading. They could essentially participate in the market, benefit from that participation, and avoid holding risk. In other words, free money.
Well I wanted some of that free money. With the state of crypto exchanges being what they were, an arbitrage opportunity wasn’t hard to come by.
The now de-funkt
For those unfamiliar, a spread is the difference between the highest buyer(bid) and the lowest seller(ask). If they meet at the price in the middle (mid) they’ll trade and their agreed upon price will represent the last(last) price the BTC was traded at. In comparison, Coinbase had spreads of <0.5%, almost always. At that moment I perked up. What was Coinbase’s last price? Is it higher than the bid on Quad? Yup. Is it lower than the -yup.
And that right there? That 2% and 0.5% spread, BTC/ETH, Quadrigacx and Coinbase? That’s arbitrage. That’s some sweet risk free half pennies, and in this case it was more like half loonies. I could be the bid and the ask on Quadrigacx, and as soon as someone trades with me (I’m the first in line, buyer or seller) I know they’ll be a better price on Coinbase to immediately close the trade. That’s exactly what Arbytrage 1.0 did. I still have the code! Email me for a copy!
It bought low when someone on Quadrigacx wanted to sell, and sold high on Coinbase less than 200 milliseconds later. Remember, HFTs in 2011 were fighting over nano-seconds. We’re still in the amateur leagues.
So how did Arbytrage 1.0 Work?
I was making roughly 0.5% on any volume I could provide. Arbytes would perform a much simpler version of it’s 2019 pair-matrix scan and instead just grab two order books; Coinbase ETH?BTC, Quadrigacx ETH/BTC. Arbytes would place orders 1% away from Coinbase’s Bid/Ask. Once an order filled, the opposite order was executed on Coinbase. The only problem left was now all my ETH was in Quadrigacx, and all my BTC was in Coinbase. While I had slightly more BTC, I couldn’t put another order into Quadrigacx. So Arbytes would rebalance the portfolio so that 50% was on Coinbase, 50% was on Quadrigacx. More over, 25% needed to be in ETH on Quadrigacx, 25% in BTC on Quadrigacx, 25% in BTC on Coinbase, and 25% in ETH on Quadrigacx. This way anyone could show up and I could “facilitate” the trade, for a small fee of 0.5% after commissions on the individual trade. Something like ~0.3% after all my other overhead (Cloud Hosting, withdrawl fees, etc.) was said and done.
I sold my BTC investment in 2017 and never bought again until late 2018, but Arbytrage lived on. I setup the email notifications you have yet to sign up for, and let it run on a Google Cloud VM. It ran until one day in 2018 Google emailed me about some error logs. Arbytrage was yelling at the moon, Quadgrigacx’s servers were returning 404.
I lost 0.78BTC that day. I wasn’t upset about the money, I was upset about the opportunity. 2 years of running this little robot. It kept working day and night, helping people trade coins. It made money, I slept. Now, Quadrigacx was closed and I had nowhere for Arbytes to go.The money printer was out of ink.