Projects:2018s1-142 Modelling the Dynamics of Cryptocurrency Market
Contents
Supervisors
- Prof Derek Abbott
- Dr Azhar Iqbal
- Dr Matthew Sorell
Honours Students
- Jeremy Abbot
- Nikolaos Flabouris
Project Description
Cryptocurrencies, such as Bitcoin, have become increasingly popular with over 600 different cryptocurrencies being actively traded. There has been much research into individual currencies (in particular Bitcoin), but very few have looked into the effect that they have on each other. This project aims to analyse the dynamics of the cryptocurrency market, including the market share distribution, behaviour of the prices, stability parameters, and the effect of the birth and deaths of new cryptocurrencies.
Background Information
Most cryptocurrencies work through the use of a blockchain - a decentralised online public ledger - where all transactions are recorded. Cryptocurrency "miners" record the transactions between traders and add them to the next block in the blockchain. To trade in cryptocurrencies a trader must first acquire a cryptocurrency wallet. This can be stored on a local machine or in the cloud. To trade a trader must move their coin to an exchange. From here the trader can make market and limit orders for other currencies that the exchange supports. Market orders are orders usually around the current trading price and can be matched immediately. Limit orders are transactions that only become available when the trade price hits a certain limit. Cryptocurrency exchanges usually support trade between fiat currencies (paper currencies like USD) and the major currencies like Bitcoin. The major currencies can then be used to trade with the less popular cryptocurrencies usually referred to as alt-coins. Fees apply to traders at various stages along this process.
Due to the potential for profit and growth as a hosting grounds for new online technologies research has begun in analysing trends and relationships between cryptocurrencies. Researchers have found connections between online traffic about a currency and its price. Others have compared cryptocurrencies considering if one can be said to be better then the rest. There are many quantitative factors to compare and measure other then just price such as market share, number of active traders/transactions and fee costs as well as any potential qualitative factors.
Methodology
To perform an analysis on some of the quantitative factors of this market an agent based model will be constructed. The model will create traders as agents that make trading decisions based on the market environment. The market will record these decisions and update its state. At each time step information about the traders and the state of the market will be recorded. This data will then be analysed to find trends as well as compare to the real world market.
The market will be initialised with exchange rates from a given date. Due to the volatility of cryptocurrencies compared to fiat currencies, if a fiat currency is used its price will be approximated as constant. A certain number of traders will be initialised with a starting amount of at money and cryptocurrencies. The website BitInfoCharts (https://bitinfocharts.com/) provides a distribution of wealth for Bitcoin. This information can be used to determine a relative wealth distribution for a market of less traders.
https://qz.com/1216880/ripples-xrp-crypto-is-more-volatile-than-ethereum-bitcoin-stocks-and-gold/
The model will consist of two types of traders; Random Traders, who make decisions at random, and Calculated Traders, who make considered decisions. Calculated Traders will analyse internal market factors, such as currency price histories, before make trading decisions. Trader transactions will be submitted to the market and randomised to determine the order of arrival of the transactions. They will be matched and processed based on their position in the queue, the currencies traded and the proposed exchange rates. A small fee will be taken from the transaction to represent exchange and blockchain fees. Some of these traders will be designated as miners. They will receive a portion of the transactions fees and, if the currency introduces new coin through miners, a portion of new coin.
Results & Discussion
In general, more traders ended up running at a loss, with very few traders making a net gain. The average calculated trader ranked 505th, while the average random trader ranked 499th. When comparing the percentage gain of the traders, the average calculated trader performed better, ranking at 480th, and the average random trader performing at 508th.
Throughout the runs, both the Ethereum and Ripple seemed to perform the best, though Ripple managed to perform positively more often that the other currencies.
Currency | Number of Best Performance | Number of Positive Performance |
Bitcoin | 3 | 2 |
Ethereum | 9 | 1 |
Ripple | 9 | 6 |
An interesting discovery was that on all runs that a currency resulted in a positive gain for its market value, a trader for each respected currency performed the best. When comparing the results with that of reality, it shows that the model is underperforming when it comes to the prices of cryptocurrencies.
A flaw of the model was that miners received too great a reward, and the costs of mining were not included. It proved difficult to initialise the traders with accurate amounts of each currency as the information to determine this is not publicly available for each currency. The model can be extended further by including external market factors, such as forum traffic, into the decision making process as this has shown to be correlated to market performance.
Conclusion
A model to replicated the features of the cryptocurrency market is possible. Analysis techniques for the data collected have been demonstrated. A better understanding of internal and external factors that influence market performance is required to improve the model’s performance.
Supplementary Information
- Blockchain
Blockchain is a new technology that was first used to create Bitcoin. Blockchain removes the need for a central authority to manage transactions between two traders. Miners around the world all maintain a local copy of the blockchain for a given cryptocurrency. A concensus is used to determine what the correct version is, the version that the majority of traders have is the correct version. Updates are propagated throughout the network and fail safes are in place to correct errors due to the delays in the network.
Each trader has a public and private cryptographic key. These keys are used to verify the identities of traders. When two traders agree to perform a transaction their cryptographic keys are used to verify their consent and the transaction is sent out into the public network. Miners collect these verified transactions and complete a proof of work task to form a block of verified transactions which is then added to the blockchain. Each block contains a reference to the previous block to form a chain. The proof of work task is used to ensure all traders have a chance to have their transaction processed. For most implementations of a blockchain the proof of work task involves guessing a random number. While having more computing power increases the chances of finding the correct number there is always a chance for any miner to find this number. This avoids the case where a large mining group could choose to completely stop including certain transactions as miners decided which transactions to include the block that they mine.
Miners end up using a considerable amount of electricity to power computers mining these blocks. As payment for their efforts in facilitating the processing of transactions miners are often rewarded with new coin of the cryptocurrency and/or the fees placed on the transactions included in the block they mine. In the case of Bitcoin both new coin and fees are allocated to the miners. Once all 21 million bitcoins are added to the market miners will only receive the fees. As miners receive the fees for the transactions they include it is more profitable for them to include transactions paying a larger fee. Traders can decide how much of a fee they are willing to pay, a large fee would encourage for the transactions to be included as soon as possible while low fees may fall down on the priority list.