ebook img

Intra-exchange Cryptocurrency Arbitrage Bot PDF

43 Pages·2017·1.97 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Intra-exchange Cryptocurrency Arbitrage Bot

SSaann JJoossee SSttaattee UUnniivveerrssiittyy SSJJSSUU SScchhoollaarrWWoorrkkss Master's Projects Master's Theses and Graduate Research Fall 12-14-2018 IInnttrraa--eexxcchhaannggee CCrryyppttooccuurrrreennccyy AArrbbiittrraaggee BBoott Eric Han San Jose State University Follow this and additional works at: https://scholarworks.sjsu.edu/etd_projects Part of the Information Security Commons, and the Other Computer Sciences Commons RReeccoommmmeennddeedd CCiittaattiioonn Han, Eric, "Intra-exchange Cryptocurrency Arbitrage Bot" (2018). Master's Projects. 655. DOI: https://doi.org/10.31979/etd.6xze-y9xu https://scholarworks.sjsu.edu/etd_projects/655 This Master's Project is brought to you for free and open access by the Master's Theses and Graduate Research at SJSU ScholarWorks. It has been accepted for inclusion in Master's Projects by an authorized administrator of SJSU ScholarWorks. For more information, please contact [email protected]. Intra-exchange Cryptocurrency Arbitrage Bot A Project Presented to The Faculty of the Department of Computer Science San José State University In Partial Fulfillment of the Requirements for the Degree Master of Science by Eric Han December 2018 © 2018 Eric Han ALL RIGHTS RESERVED The Designated Project Committee Approves the Project Titled Intra-exchange Cryptocurrency Arbitrage Bot by Eric Han APPROVED FOR THE DEPARTMENT OF COMPUTER SCIENCE SAN JOSÉ STATE UNIVERSITY December 2018 Dr. Thomas Austin Department of Computer Science Dr. Mark Stamp Department of Computer Science Dr. Jon Pearce Department of Computer Science ABSTRACT Intra-exchange Cryptocurrency Arbitrage Bot by Eric Han Cryptocurrencies are defined as a digital currency in which encryption techniques are utilized to regulate generation of units of currency and verify the transfer of funds, independent of a central governing body such as a bank. Due to the large number of cryptocurrencies currently available, there inherently exists many price discrepancies due to market inefficiencies. Market inefficiencies occur when the price of assets do not reflect their true value. In fact, these types of pricing discrepancies exist in other financial markets, including fiat currency exchanges and stock exchanges. However, these discrepancies are more significant in the cryptocurrency domain due to the low levels of government regulation, higher amounts of speculation, and human behaviors driven by investors seeking profit. These types of pricing discrepancies can be eliminated to some extent by executing arbitrages, which are defined as a sequences of trades beginning and ending with the same asset which result in more of that asset at the end of the trading sequence. Through executing arbitrages, the market should become more efficient. This project was an attempt to execute intra-exchange arbitrage on the well- known cryptocurrency exchange Binance and generate profit, and as a side effect make the cryptocurrency exchange market more fluid. Although the project did not record phenomenal profits, it did successfully generate several hundred dollars over the course of several months, independent of market fluctuations. ACKNOWLEDGMENTS I want to thank my family: KY Han, Sue-Jane Han, and Jason Han for their undying support of me through this period of my life, along with Professor Thomas Austin, Professor Mark Stamp, Professor John Pearce, and Professor Katerina Potika fromSanJoseStateUniversityComputerScienceFaculty. Theiroutstandingpedagogy has inspired me as a student to try novel ideas, no matter how absurd they sound. v DEDICATION I would like to dedicate this Project to all my my friends and family who are going through struggles and feel like there’s no light at the end of the tunnel. Remember, a any dream you have written down with a date becomes a goal. A goal broken down into steps becomes a plan. A plan backed by actions makes your dreams come true. vi TABLE OF CONTENTS DEDICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi CHAPTER 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Research Objective . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Background and Related Work . . . . . . . . . . . . . . . . . . . . 3 2.1 History and Background . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Types of Currency Arbitrage . . . . . . . . . . . . . . . . . . . . . 4 2.3 Current Cryptocurrency Arbitrage Implementations and Challenges 5 2.4 Bellman-Ford and Asset Arbitrage . . . . . . . . . . . . . . . . . 8 3 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 Technical Approach/Methodology . . . . . . . . . . . . . . . . . . 11 3.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.1 Program Setup (List of classes and other files used) . . . . 12 3.2.2 Libraries Used . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.3 Miscellaneous Data Structures Used . . . . . . . . . . . . . 14 4 Experiments and Results . . . . . . . . . . . . . . . . . . . . . . . . 16 4.1 Bitcoin Only Experiment . . . . . . . . . . . . . . . . . . . . . . . 16 4.2 ‘‘amountBuffer’’= 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.3 ‘‘amountBuffer’’ = 2 . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 ‘‘amountBuffer’’ = 3 . . . . . . . . . . . . . . . . . . . . . . . . . 21 vii 4.5 ‘‘amountBuffer’’ = 4 . . . . . . . . . . . . . . . . . . . . . . . . . 22 5 Discussion and Observations . . . . . . . . . . . . . . . . . . . . . 28 5.1 Important Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6 Conclusion and Future Work . . . . . . . . . . . . . . . . . . . . . 30 LIST OF REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 viii LIST OF FIGURES 1 Table showing Additional Bitcoins, Percent Increase, and Percent Increase from Beginning vs Arbitrage Executions. . . . . . . . . . 17 2 Total Account Bitcoin Value vs. Arbitrage Sequences Executed. . 18 3 Table showing Profitability with amountBuffer = 1. . . . . . . . 19 4 Graph showing arbitrage results with amountBuffer = 1. . . . . . 20 5 Table showing Profitability with amountBuffer = 2. . . . . . . . 20 6 Graph showing arbitrage results with amountBuffer = 2. . . . . . 21 7 Table showing Profitability with amountBuffer = 3. . . . . . . . 22 8 Graph showing arbitrage results with amountBuffer = 3. . . . . . 22 9 Table showing Profitability with amountBuffer = 4 (Run 1). . . . 23 10 Graph showing arbitrage results with amountBuffer = 4 (Run 1). 24 11 Table showing Profitability with amountBuffer = 4 (Run 2). . . . 24 12 Graph showing arbitrage results with amountBuffer = 4 (Run 2). 25 13 Table showing Profitability with amountBuffer = 4 (Run 3). . . . 25 14 Graph showing arbitrage results with amountBuffer = 4 (Run 3). 26 ix

Description:
known cryptocurrency exchange Binance and generate profit, and as a side effect make the cryptocurrency exchange market more fluid. Although the
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.