Cryptocurrencies and Artificial Intelligence: Challenges and Opportunities

Decentralized cryptocurrencies have gained a lot of attention over the last decade. Bitcoin was introduced as the first cryptocurrency to allow direct online payments without relying on centralized financial entities. The use of Bitcoin has vastly grown as a financial asset rather than just a tool for online payments. A lot of cryptocurrencies have been created since 2011 with Bitcoin dominating the cryptocurrencies’ market. With plenty of cryptocurrencies being used as financial assets and with millions of trades being executed through different exchange services, cryptocurrencies are susceptible to trading problems and challenges similar to those traditionally encountered in the financial domain. Price and trend prediction, volatility prediction, portfolio construction and fraud detection are some examples related to trading. In addition, there are other challenges that are specific to the domain of cryptocurrencies such as mining, cybersecurity, anonymity and privacy. In this paper, we survey the application of artificial intelligence techniques to address these challenges for cryptocurrencies with their vast amount of daily transactions, trades and news that are beyond human capabilities to analyze and learn from. This paper discusses the recent research work done in this emerging area and compares them in terms of used techniques and datasets. It also highlights possible research gaps and some potential areas for improvement.


I. INTRODUCTION
This paper surveys research work applying artificial intelligence and machine learning techniques in the field of cryptocurrencies. Analyzing cryptocurrencies is considered a relatively recent domain that became active in the last decade. Bitcoin was announced at the end of 2008 as the first decentralized cryptocurrency that relies heavily on the field of cryptography for hashing and signing transactions. These transactions are committed to a distributed blockchain ledger to be synced and verified by nodes in a peer-to-peer network. The Bitcoin blockchain size reached over 280 GB in June, 2020.
With this big data representing transactions in the blockchain coupled with millions of trades being executed on different exchange websites, growing number of tweets, posts and articles related to Bitcoin and cryptocurrencies, there is The associate editor coordinating the review of this manuscript and approving it for publication was Xiaochun Cheng. a clear need for automated tools to process and analyze this big data. Artificial intelligence (AI) techniques can learn from this massive amount of data by analyzing and discovering patterns to ease and secure trading and mining. Discovering patterns in money-laundering transactions and other fraudulent transactions and trading schemes can help limit the crimes involving cryptocurrencies due to privacy and security threats they encounter. Artificial intelligence (AI) techniques are not limited to machine learning (ML) techniques (supervised, unsupervised, semi-supervised, and reinforcement), but also include evolutionary-based techniques and knowledge-based techniques [1].
The topic of data analytics for cryptocurrencies is gaining importance as more entities are becoming more reliant on cryptocurrencies. Our work differs from previous related surveys by focusing on the research of using artificial intelligence and machine learning techniques in cryptocurrencies as digital currencies or crypto-assets and the surrounding ecosystem. Hassani et al. [2] studied the interactions between Big Data and cryptocurrency focusing on two perspectives, namely, ''security and privacy enhancement'', and ''prediction and analysis''. They also used the word ''cryptocurrencies'' for its underlying blockchain technology and its applications and not for cryptocurrencies as digital currencies like in our work. Other authors in [3], [4] and [5] presented surveys on blockchain applications in AI and robotics. None of the mentioned surveys have explored the application of AI techniques to tackle cryptocurrencies' challenges.
Our survey considers papers from reputable peer-reviewed conferences and journals. Papers that include mere descriptive statistics or discuss the use of AI in other blockchain applications like healthcare, smart contracts and IoT were excluded. The following exploratory questions form the basis for this paper: • What are the problems in the cryptocurrencies domain that has been approached using AI techniques?
• Which AI techniques have been studied in the literature and employed in the field of cryptocurrencies, and what are the datasets used in this domain?
• What are the possible research gaps and areas of improvement that can be further studied? The rest of this paper is organized as follows. Section II provides a background about Bitcoin and cryptocurrencies. Section III illustrates research problems related to the cryptocurrencies domain and reviews artificial intelligence and machine learning research addressing these problems. Section IV discusses possible research gaps and potential areas of improvement and conclusion of the paper is in Section V.

II. BACKGROUND
Bitcoin, the cryptocurrency with the highest market capitalization, has been circulating for more than a decade since January 3 rd , 2009. Since then, Bitcoin has demonstrated tremendous success as a financial asset and there are currently around 18 million Bitcoins (BTCs) being traded and exchanged. Bitcoin, however, does not resemble other traditional assets from an econometric perspective [6].
On the technical level, Bitcoin depends on a decentralized peer-to-peer network that aims to replace the centralized financial system. In this decentralized network, a distributed ledger saves all the transactions taking place in a blockchain structure. This blockchain is synced by all nodes in the network to verify the transactions. Transactions are added to the blockchain in blocks by miners after they compete to solve a cryptographic puzzle.
Bitcoin uses elliptic curve digital signature algorithm (ECDSA) to sign a transaction between sender's and receiver's Bitcoin addresses. Bitcoin addresses are identifiers of 26-35 alphanumeric characters, formed by hashing of the public keys of the sender or receiver. Using these addresses made Bitcoin transactions look anonymous, however they are actually pseudo-anonymous. SHA-256 hashing is also used in Bitcoin's proof-of-work consensus strategy. Proofof-work (PoW) is needed by the blockchain to secure the distributed ledger against any tampering attempts. This is achieved through solving a computationally-intensive cryptographic problem that is hard to solve but easy to verify. The nodes compete to find a nonce that results in a block hash with a certain number of leading zeroes. The winner node adds a block of transactions to the blockchain and receives a block reward set by the Bitcoin protocol in addition to transaction fees from senders. The block reward was initially set to 50 BTC and it halves after every 210,000 blocks are added to the chain. This halving process happens nearly every four years. The block reward, at the time of writing this paper is 6.25 BTC. This process is called mining new Bitcoins. In the early days of Bitcoin, the difficulty of the PoW problem was relatively easy and Bitcoin mining was done using a personal computer with good CPU. As the difficulty increases, higher hash rates are needed to solve the crypto-puzzle. Machines with higher computing power that use graphics processing units (GPUs) and field-programmable gate array (FPGAs) were used for mining new coins. Currently, mining pools are of very high processing power and most of them use application-specific integrated circuits (ASICs), which are special hardware circuits designed specifically for Bitcoin mining.
There are other alternative cryptocurrencies (altcoins) that offer greater speed, anonymity or some other advantages over Bitcoin. Namecoin was the first altcoin created as an attempt to improve some features like decentralization, security, privacy, and DNS speed, etc. Other examples are Litecoin, Ripple, Ethereum, Zcash, Monero, BCH, Dash, etc. Currently, there are more than 2000 cryptocurrencies as per CoinMarketCap. 1 However, Bitcoin dominates the market with more than 70% of the market share as shown in Figure 1 as per the market capitalizations reported by CoinMarketCap in July, 2020. 1 https://coinmarketcap.com/ VOLUME 8, 2020 Decentralization allows cryptocurrencies to be more immune to government control and interference. On the other hand, as a disadvantage for the lack of mature regulations in the cryptocurrencies market; cryptocurrencies have been used in the dark web for money-laundering, weapons and drug dealings, and other criminal activities. Many countries have recently been forcing know-your-customer (KYC) and anti-money laundering (AML) policies on exchanges while conducting research to have their government-regulated cryptocurrencies and waiting for regulations acceptance. Similarly, Facebook Libra Coin is waiting for the necessary regulatory acceptance and was planned to launch in 2020. The Libra coin, governed by an ''independent'' association, is designed to overcome the problems of volatility and lack of scalability in existing cryptocurrencies.
This noticeably growing market of cryptocurrencies brings about the problem of analyzing the tremendous amount of trades and transactions taking place for different cryptocurrencies through different exchanges and over different blockchains. Artificial intelligence (AI) is a good candidate for solving problems involving this immense amount of data that humans can not analyze efficiently.
Techniques and models used in artificial intelligence tasks can be categorized into machine learning techniques, evolutionary-based techniques, knowledge-based techniques and other techniques in which machines think and act humanly and rationally as per the typical definition of AI [1]. There are many key players with various needs that can be inferred from the cryptocurrencies ecosystem (see Figure 2), e.g. traders (including criminals), regulatory agents, miners, security specialists, etc. Automated traders can analyze and learn from the cryptocurrencies' market prices and markers for taking trading decisions and achieving high returns for their owners. Regulatory institutions can use AI to learn from the data about possible financial frauds and potential threats. Miners can make use of AI techniques to increase their profit and save electricity for environmental considerations. Security specialists can use these techniques to analyze and assess the security and privacy level of cryptocurrencies and spot possible pitfalls and threats.

III. ARTIFICIAL INTELLIGENCE RESEARCH IN CRYPTOCURRENCIES
Cryptocurrencies face similar challenges to fiat currencies' and other financial market assets' challenges. According to Business Insider Report 2 in June 2019, there are three areas where AI techniques are used in banking, namely, conversational banking, anti-fraud detection, risk assessment and credit underwriting. Additionally, financial chatbots and voice assistants that mimic live employees, deepen customer relationships and provide personalized insights and recommendations, are examples of software systems using AI in the financial field. Moreover, AI is extensively used in intelligent trading systems to do stock market prediction and currency price prediction. This helps in taking decisions on when to buy, hold or sell a stock based on different markers that change over time. Furthermore, anti-fraud detection tasks make use of machine learning to learn from spending behaviors and patterns and detect suspicious patterns.
Trading cryptocurrencies shares with the financial market the aforementioned problems. Using artificial intelligence in cryptocurrencies, like in financial services, reduces the risk of human error and speeds up the process of trading by predicting the value of the currency or its rise and fall over time. In addition, there are some other challenges that are specific to cryptocurrencies that can be deduced from the cryptocurrencies ecosystem in Figure 2 and to which AI techniques can offer useful solutions.
From the reviewed papers in this domain, we can summarize the categories for challenges facing cryptocurrencies in a taxonomy shown in Figure 3. There are challenges that are related to the trading process like price and trend prediction, volatility prediction, portfolio construction, fraud detection and other analysis tasks to get insights and indicators about different cryptocurrencies. Trading bots do all of these tasks for trading cryptocurrencies. These challenges involve using machine learning techniques to learn from historical data of prices, other market indicators and social media interests to take profitable trading decisions. Additionally, natural language processing (NLP) -which involves using many AI techniques-is needed for sentiment analysis and processing of news, social media posts (e.g. Twitter, Facebook, Telegram [7], LinkedIn, Reddit, etc) and domain forums like BitcoinTalk 3 and Ethereum Community Forum. 4 The use of word2vec-based topic modeling and other NLP techniques 2 https://www.businessinsider.com/the-ai-in-banking-report-2019-6 3 http://bitcointalk.org 4 https://forum.ethereum.org/  was demonstrated in [8] to analyze Reddit submissions' topics temporally with the price shifts occurring during 2017 and 2018. NLP can be also useful if a trading bot is built to be a conversational bot to ease the trading experience. Moreover, NLP is a core component in the design of chatbots replying to queries and questions about cryptocurrencies as proposed in [9].
Other challenges include mining of crypto-coins, anonymity and privacy of cryptocurrency transactions, and security of the cryptocurrency peer-to-peer network, users' wallets and exchange services. Transactions' delay is a problem faced by cryptocurrencies, and specifically Bitcoin, as it takes some time for transactions to be approved on the various chains and confirmed. Transaction confirmation delay depends on many factors in the mining process so we will classify this problem among the mining challenges. Blockchain size and its high degree of replication is also considered as a challenge to cryptocurrencies but it is mainly considered as a challenge with the protocol definition and the data storage technology which is not typically tackled by AI techniques. The research on applying AI techniques in the field of cryptocurrencies has grown in the last four years especially after the price hype in 2017.
The next subsections briefly describe the cryptocurrencies' challenges identified in Figure 3 that can be tackled by AI techniques. Classification of the research work is done according to the challenge it addresses. The main research papers in each category are reviewed briefly. There exist a large amount of published papers particularly for tackling the price forecasting/prediction problem. Therefore, we could not be exhaustive in citing every piece of work that was done. Nevertheless, we chose to include papers that use diverse techniques of AI and that can contribute to answering the second question of this survey as mentioned in section I, related to the AI techniques employed in the field of cryptocurrencies and the datasets used in this domain.

A. PRICE PREDICTION/FORECASTING
The attention to Bitcoin and other cryptocurrencies as financial assets has grown dramatically in the last three years. This was after the hype occurred by the end of 2017 when the price of Bitcoin reached about 20,000 USD as shown in Figure 6.
For trading cryptocurrencies, domain observers and traders need to do Bitcoin/cryptocurrency analytics and to predict the cryptocurrency price. The terms ''price prediction'' and ''price forecasting'' are usually used in the same way to refer to the task of predicting an estimate for the price based on the history of past prices and other explanatory variables. The term ''prediction'' is more general as it refers to either prediction of the current or future prices while forecasting is used to refer to making estimates about the future prices or trends. The term ''prediction'' is widely used by researchers so it is adopted in the rest of this survey.
The price of Bitcoin can be affected by many factors (sometimes called indicators/markers/features or variables), among them are the interaction between supply, demand and attractiveness for investors. These factors are usually affected by trends in social networks, forums, search engines, declarations by leaders and political stability of countries. Past fluctuations in cryptocurrency's price or trades' growth/decline can be used to determine possible trends and predict what could happen in the future. Other factors that might affect cryptocurrency price are: other cryptocurrencies' prices, blockchain data, the gold price, silver price, oil price, stock market variables like S&P 500 index (Standard and Poor 500 index that measures the performance of the stocks of 500 big-size companies in the U.S. stock exchanges), and other financial technical indicators for cryptocurrency and other stock markets such as those used in [10]. Online factors that represent to an extent the public adoption and awareness of Bitcoin and other cryptocurrencies such as Reddit posts, Wikipedia views, Google trends, etc., were used by some researchers [11]- [16]. Table 1 shows the different factors used in literature indicating whether positive (+) or negative (-) correlation with the Bitcoin prices is reported and whether it is reported as a significant correlation (*).
The basic flow of most of the work done in this area starts with the collection of time-series data for different variables of concern. Analysis of the data and relationships between different variables and the cryptocurrency price are then deduced. A supervised machine learning technique is used to learn a model from data which can then be used for prediction. Using history of different variables makes price prediction a time-series prediction task. It can be modeled as a regression problem to predict the closing price based on a set of indicators. It can also be modeled as a classification problem to predict if there will be a rise/fall or no change in the price of a coin by encoding the cryptocurrency price time series output variable in terms of rise and fall. A linear time series model for cryptocurrency price can be generalized by Equation 1, where y t is the cryptocurrency price response variable, X is the input time series of explanatory variables and indicators such as those in Table 1, and k is the order of the auto regressive model to represent a dependency on the history of both the input variables and the history of the price.
Different regression models and statistical models have been tested by researchers to fit this linear model in different ways [11], [12], [15], [17]- [19]. Simple linear time series models sometimes leave certain aspects of economic and financial data unexplained [29]. That is why some authors tested nonlinear time series models to model nonlinear behavior in economic and financial time series data [13], [14], [16], [20]- [28]. Table 2 shows a summary for the research on price prediction of cryptocurrencies comparing the used AI techniques and datasets in each paper. They are ordered by the year of publication. Certainly, there are more papers published in this very active area of predicting and analyzing cryptocurrency prices. We only included recent publications with a set of diverse AI techniques being tested. As it can be seen from Table 2, each study depended on a different dataset with different features over different time periods for training and testing. Additionally, they used different evaluation metrics for evaluating the results. Geometric mean return and the Sharpe ratio were used in [23]. Young et al. [13] used accuracy, F1-Score and Matthews correlation coefficient (MCC). Mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE) were used in [21], [25]. Mean absolute percentage error (MAPE) was used in [20], [22], [26]. Accuracy, recall, precision and F1 Score were used in [16], [20], [27]. Moreover, the results can not be easily replicated due to the different models' parameters that are not thoroughly mentioned. For these reasons, it is a very difficult task to recommend a certain model over the others as a stateof-the-art for price prediction. However, at the end of this section we will give summarized observations based on the results reported in the referenced papers.
We have classified some of the state-of-art research done in this area according to the main model(s) type it uses; whether it is a statistical-based model, probabilistic-based model, neural network based model or a tree-based model (based on decision trees). Some papers tested different types of models and will be added in a separate subsection.

1) USING STATISTICAL BASED MODELS
There are many statistical techniques and models that have been used in Bitcoin price prediction and analysis. Multiple linear regression was used in [11], [12], [17] to model the relationship between the Bitcoin cryptocurrency price and some predictor variables. These variables included some economic and financial variables. Additionally, measurements of public interest in Bitcoin from Twitter feeds, Google Trends and Wikipedia views related to Bitcoin [11] were recorded. Twitter and Google Trends data were also used by [12] to predict prices of Bitcoin and Ethereum. They found that the tweet volume, rather than the tweet sentiment is a good predictor of price.
Ordinary least squares (OLS) criterion was used to model short-run impact of independent variables on the price of Bitcoins while long-run relationships between the co-integrated time series were captured using a vector error-correction model (VECM) in [11]. OLS was used in [15] to estimate the parameters of autoregressive distributed lag models (ARDL) depending on features describing how political incidents and statements mentioned in the news affect the price, the oil price, gold price and volatility variables, Google search volume, positive and negative shocks.
Logistic regression (LR) was compared to autoregressive integrated moving average (ARIMA) for Bitcoin Price prediction in [18] and its other variants in [19]. OLS regression and fractionally integrated ARMA (ARFIMA) were used in [19] to investigate the stochastic properties of the top six largest cryptocurrencies at that time (Bitcoin, Ethereum, Ripple, Litecoin, Stellar and Tether) and their relationship to six stock market indices.

2) USING NEURAL NETWORK BASED MODELS
Young et al. [13] used a deep learning model to predict Bitcoin price and extent of transactions fluctuation of the currency. Deep learning was also used in [28] to predict Bitcoin and Ethereum prices in Australian dollars (AUD). A comparative study of different deep learning models (deep neural network (DNN), long-short term memory (LSTM) and artificial neural network (ANN)) was done in [20] for Bitcoin price prediction. LSTM-based prediction models slightly outperformed other techniques for regression of Bitcoin price while DNN-based models performed better for classification of price changes whether up or down. They also showed that classification models were more effective than regression models for trading profitability.
In [21], Yiying et al. analyzed the price dynamics of Bitcoin, Ethereum and Ripple using ANN and LSTM. They surprisingly found that ANN relies more on long-term history while LSTM tends to rely more on short-term dynamics efficiently utilizing useful information hidden in them.
Many other researchers have tested neural networks and its variants, some of them are reviewed and compared in [22]. The authors of [22] proposed layer-wise randomness into the observed features' activations of multilayer perceptron (MLP) and LSTM to simulate market volatility. They achieved no more than 5% average improvement in MAPE in their best case experiment with 23 features with a window size of 7 days.

3) USING TREE-BASED MODELS
Alessandretti et al. [23] tested three forecasting models using daily cryptocurrency prices of 1,681 currencies. The first model is a decision tree model to predict the return on investment for all cryptocurrencies. The second model is a gradient boosting decision tree model for each cryptocurrency to make a prediction on each cryptocurrency depending on information about the behaviour of the whole market. In the third method, they used a different LSTM model for each currency, where the prediction is based on previous prices of the currency. For parameter optimization, they used two evaluation metrics; the geometric mean return and the Sharpe ratio. The three methods performed better than the baseline simple moving average strategy when applying the investment strategy for the whole period considered. The optimization of parameters based on the Sharpe ratio achieved higher returns. Methods based on gradient boosting decision trees performed best for short-term 5/10 days predictions. On the other hand, LSTM performed best for predictions based on ≈ 50 days of data, since they are able to also capture long-term dependencies and were very stable against price volatility.

4) USING PROBABILISTIC BASED MODELS
Shah and Zhang [24] used Bayesian regression for predicting Bitcoin prices. Kim et al. [14] used averaged one-dependence estimators (AODE) as a prediction model which is a probabilistic classification learning technique. They used the model to predict fluctuations in prices and number of transactions at different lags. VOLUME 8, 2020  Hidden Markov model (HMM) has been used in [25] to address the dynamics of Bitcoin prices and get hidden information that cannot be directly extracted. A total of 52 features were then fed to an LSTM to predict the Bitcoin prices. Genetic algorithm was used in optimizing the parameters of LSTM. Effectiveness of the resultant model HMM-LSTM was compared to ARIMA and conventional LSTM and was found to outperform them in terms of MSE, RMSE and MAE.
Bayesian neural network (BNN) was used in [26] for regularizing weights of input variables to a neural network to account for the high volatility of Bitcoin price. The input variables included blockchain variables, macroeconomics variables and international fiat currencies exchange rates. BNN was found to outperform support vector regression (SVR) in terms of RMSE and MAPE.

5) USING DIFFERENT MODEL TYPES
In [16], neural networks (NN), MLP, support vector machines (SVM) and random forest (RF) were used for the prediction task to predict the price of the Bitcoin, Ethereum, Ripple and Litecoin cryptocurrency market movements. MLP was found to outperform the other models in case of Bitcoin, Ethereum and Ripple, while SVM performed the best in case of Litecoin. Shintate and Pichl [27], proposed a random sampling method (RSM) for Bitcoin time series trend prediction and they used a walk forward optimization method. They used this method to account for non-stationarity of the high-frequency time-series trading data. They compared the proposed approach to LSTM and MLP. The profit rates based on RSM were higher than those based on LSTM and MLP, and not easily biased by class imbalance. Differently, designing automatic trading strategies has been tackled in [30] using reinforcement learning. Double and dueling double deep Q-learning networks were used with testing two reward functions: Sharpe ratio and profit reward function. The system based on Sharpe ratio achieved the highest profits for Bitcoin trading over a period of almost four years of simulation.
In [31], many statistical machine learning techniques like support vector regressions (SVR) and Gaussian Poisson regressions (GRP), algorithmic models such as regression trees (RT) and the k-nearest neighbours (k-NN) and finally artificial neural network topologies such as feedforward (FFNN), Bayesian regularization (BRNN) and radial basis function networks (RBFNN) to find BRNN achieving the best accuracy. They used Bitcoin intra-day price data sampled at 5 minutes intervals in the period from January 1 st , 2016 to March 16 th , 2018.
In [17], the authors compared different techniques and least absolute shrinkage and selection operator (LASSO) was found to dominate in predicting the 30-day returns of cryptocurrencies. In [20], LSTM slightly outperformed the other models under test when the prediction task was modeled as a regression problem, whereas DNN slightly outperformed the other models when perceived as a classification problem.
There is no single model that can be said to be the best for the problem of cryptocurrency price prediction as the model depends on many factors such as the size of the dataset, the different indicators and features at different lags to be used for prediction. Furthermore, the uncertainty associated with the crypto-prices and the random black swan events that can happen at anytime, are hard to be predicted by any model with good accuracy. In Figures 4 and 5, box plots were plotted for the range of values reported for accuracy  and MAPE for some of the machine learning models used in [13], [14], [16]- [18], [20], [22], [26], [27]. The most common evaluation metric for the models treating price prediction as a classification problem was accuracy as in Figure 4 and MAPE was used as the common evaluation metric for regression models as in Figure 5. Figure 4 shows that LR, linear discriminant analysis (LDA) and RF achieve the best results for classification models while MLP and stochastic MLP were the best for regression models as shown in Figure 5. The best reported accuracy is 72% and the best MAPE is 2.8% but each was based on different features and time periods. Price prediction models are away from perfect prediction due to the speculation involved in trading and the complexities involved in the market that affect the trading decisions but as it is well known all models are wrong, but some are useful. Other studies [11], [12], [15], [19], [21], [23]- [25], [28] used different evaluation metrics so they were not included in the figures.
We believe that the best model highly depends on the selected features and the period of study. It can be a good approach to first test the time series for the prices and the different indicators for non-linearity using statistical tests and analytic techniques used in [32] to analyze the effect of different factors on the daily prices of cryptocurrencies. The work in [32] did not use any machine learning model to learn from these factors. However, the results presented can be analyzed and used to determine the best factors to use for building a cryptocurrency price prediction model. In [33], the authors tested for the importance of the economic and technology factors affecting the Bitcoin price over different periods of time using ANN and RF after dividing the Bitcoin price time series into four periods. It might also be useful to learn models based on segmented time periods. Some other nonlinear tests and techniques listed in [34] have not been explored in the field of cryptocurrencies price prediction.

B. VOLATILITY PREDICTION
Volatility is defined as the degree of variation of a trading price series over time. It represents the amount of uncertainty or risk about the size of changes in currency value. Bitcoin and other cryptocurrencies are considered to be volatile. Figure 6 shows a graph for cryptocurrencies' prices until the start of March 2020. Volatility of cryptocurrencies is mainly caused by their decentralized nature making their prices uncontrollable by any organization or government. Accordingly, cryptocurrencies can be considered as being traded in a free market where the price is solely determined by the supply and demand, however, there are other opinions that oversee the presence of a true long-run dependency [11], [13], [17] which invalidates the efficient market hypothesis. There are other factors affecting the price value, other than the interaction between supply and demand as mentioned in the last section. People investing in Bitcoin consider high volatility to be an indication of high-risk investment.
Volatility accounts for price movement away from its average value. A cryptocurrency price range could be estimated if volatility can be predicted or estimated for a day or a week based on historical data. Table 3 provides a summarized comparison of research papers using AI techniques to model cryptocurrency volatility and the datasets used.
Generalized autoregressive conditional heteroskedasticity (GARCH), which is a time-series statistical model, is used for modeling volatility [35]- [37]. Twelve different GARCH models were tested in [35] for modeling Bitcoin, Dash, Dogecoin, Litecoin, Maidsafecoin, Monero and Ripple. Integrated GARCH (IGARCH) and Glosten-Jagannathan-Runkle GARCH (GJRGARCH) models were found to be the best fit for most cryptocurrencies. Maximum likelihood was used to fit the different GARCH-type models. Peng et al. [36] combined the traditional GARCH model with Support Vector Regression (SVR), which can cover multi-variate and dynamic characteristics of financial series robustly. It was used to predict the volatility of three cryptocurrencies (Bitcoin, Ethereum and Dash) and three fiat currencies (Euro, British Pound and Japanese Yen) to evaluate the alternative risky investments and guide the investment decisions. They provided strong evidence that the SVR models significantly outperforms the traditional GARCH models. Using and comparing GARCH models was also investigated in [37] to model volatility in Bitcoin, Ethereum, Litecoin, Ripple, Moreno, Dash, Stellar and NEM. Then, they estimated the one-day-ahead value-at-risk (VaR) forecasts. The asymmetric GARCH models with long memory property achieved overall better performance for all cryptocurrencies.
Guo et al. [38] tested temporal mixture model using both incremental learning and rolling procedure for performance prediction to predict volatility of Bitcoin prices. They compared their model to different statistical (GARCH, Beta-GARCH, structural time series model, ARIMA) and machine learning baseline models (Random Forest, Gradient Boosting, Elastic-net regression, Gaussian process based regression and LSTM). Their temporal mixture model proved to be more accurate in most of the cases while being robust and adaptive with respect to time-varying data.
Other linear and nonlinear machine learning models were used for predicting realized volatility in Bitcoin prices based only on past values of realized volatility at different lags in [39]. Ridge regression was found to perform the best in terms of MSE and RMSE among the tested techniques (ANN in its different forms (MLP, GRU and LSTM), SVM, ridge regression, and heterogeneous autoregressive realized volatility (HAARV)).

C. AUTOMATED TRADING
Many cryptocurrencies' trading bots are currently available that implement trading strategies and offer customized customer's strategy. Trading bots are software products or websites that offer what is called ''algorithmic trading'' as they automatically analyze market actions and indicators, offer strategies to maximize trader's gains and improve her satisfaction. They can aggregate historical market data, calculate indicators, simulate order execution and even can be set up to execute strategies while the customer is asleep. Some bots use natural language processing techniques to communicate with the customer in a more natural and friendly way [9]. In the design of these trading bots, many algorithms and techniques similar to those used for price and volatility prediction mentioned in the last two subsections are used to maximize the profit and develop a strategy with maximum return. They differ in the number of exchanges they support and the features they offer. Additionally, they can offer portfolio construction and optimization to find an optimal weighing of financial assets which might include Bitcoin, other cryptocurrencies and other traditional financial assets like stocks and bonds. This optimization aims at maximizing the overall return while minimizing the variance of the return. The results in [41] suggest that investors should include Bitcoin in their portfolio as it generates substantial higher risk-adjusted returns through comparing eight different well-known portfolio optimization techniques widely used for traditional assets. They used the statistical-based GARCH model to learn the dynamic conditional correlations between Bitcoin prices and other bonds and indices.
Hierarchical risk parity approach was applied in [42] to a large portfolio of 61 cryptocurrencies which involves an unsupervised tree clustering, quasi-diagonalization and recursive bisection. They carried out-of-sample comparison with traditional risk-minimization methods for financial assets (Inverse Volatility (IV), Minimum Variance (MV), and Maximum Diversification (MD)). A thorough review of financial portfolio optimization techniques can be found in [43]. We are here only concerned with applying AI and ML techniques in portfolio construction and optimization for automated trading of cryptocurrencies. Alessandretti et al. [23] used the gradient boosting decision trees models and and LSTM prediction model to build investment portfolios for cryptocurrencies based on the predictions optimizing the geometric mean return and the Sharpe ratio. Nakano et al. [44] used a deep neural network for return prediction in Bitcoin intra-day trading based on technical variables and time-series data every 15 minutes. Irene et al. [45] relied on variants of GARCH models to determine the optimal portfolio weights for a minimum variance equity portfolio. Differently, Cocco et al. [46] viewed the trading optimization problem from an evolutionary perspective and proposed using genetic algorithms (GA). They simulated a Chartist trading agent that uses the best trading rules evolved through GA against random traders.
The area of applying artificial intelligence and machine learning in portfolio construction and optimization for cryptocurrencies is considered a recent research area. It still needs further investigation to find the best strategy that suits cryptocurrencies while getting benefit from machine learning models and techniques used for other financial assets [47].
Investors classification can help investors and automated trading bots get more insights about the cryptocurrencies market and its price dynamics in order to develop profitable trading strategies. In [48], the socio-demographic characteristics of cryptocurrency investors and the factors that affect their investment decisions (whether they invested, never invested or intend to invest in the future) for any cryptocurrency are investigated. With about 402 survey responses for Australian and Chinese blockchain and cryptocurrencies' followers, they built a multinomial Logit model to find the factors that affect the choice of investment in cryptocurrency coins versus other types of initial coin offering (ICO) tokens. They found age, gender, education, occupation, and investment experience significantly affect the decision. Having insights and clear analysis for the reasons behind people's investing decisions in an ICO is critical to decide on trading strategies. It can help in marketing ICOs of cryptocurrencies, but bigger and more diverse datasets are required to have a good outcome.
In a recent study [49], the authors used unsupervised clustering technique to group different types of investors. They based their clustering on similarities in trading behavior according to trade volume, average bid volume, average relative price and average duration to finish a trade from the time the offer is placed on a well-known exchange website. They were able to classify investors into 10 clusters (six types of investors offering Bitcoins and four types of investors ordering Bitcoins). They used ARDL model to identify the factors (macro-financial, technical trading indicators, technological measures and market sentiment from Twitter) that might influence the trading behavior of investor types (speculators, cryptocurrency miners, informed traders, large professional investors, USD-orientated investors, global traders, etc.). They showed that the exchange rate of Bitcoin is seen to be significantly driven by the number of orders placed by only one cluster of investors. The discussion in their work sheds more light on the cryptocurrency market investors and the herd behavior shown by one cluster which results in speculative price changes. We suggest that performing a similar behavior clustering analysis directly on blockchain data, although it will face many challenges, may give a more accurate clustering. It might give more evidence about how different indicators affect the investors' behaviors and accordingly affect the price.

D. FRAUD DETECTION
The use and reputation of Bitcoin and other cryptocurrencies in aiding illicit activities is a big concern, as it affects the stability and the trust in cryptocurrencies. Cryptocurrencies are known to attract cybercriminals for their pseudo-anonymity and for being operated outside the laws of governments and banks. However, regulators are continuously trying to enforce know-your-customer (KYC) and anti-money laundering (AML) laws for exchanges and escrow services. There are different types of scams and criminal activities that can occur in cryptocurrencies, such as digital theft, hacking, phishing, Ponzi-schemes, pump-and-dump schemes, purchasing illegal drugs and money laundering in the black market. A Ponzischeme is one of the fraudulent schemes that offer high rates of return for early investors as it generates returns for early investors by acquiring new customers.
Fraud detection is based on detecting anomalies and suspicious behaviour in the transactions and trades history [50], especially that Bitcoin transactions are transparently recorded on the blockchain public ledger.
With the scarcity of labeled incidents or examples for different fraud activities, Monamo et al. [50] used trimmed k-means and k-means clustering based on features from the transactions graph in a semi-supervised way to detect fraudulent activity in the Bitcoin transactions network. Both algorithms achieved optimal clustering. The trimmed algorithm was able to detect 5 from the 30 well-known anomalies such as the Mt Gox, Linode Hack, and 50 BTC Theft as examples for thefts and hacks. Using k-d trees, they were able to detect 2 more thefts. Based on the clustering labels for outliers, the authors employed some supervised classification models to understand the relation between the labels and predictor variables. Random forest achieved the best precision.
For estimating the proportion of possible cybercriminal entities in the Bitcoin ecosystem, Yin et al. [51] tested 13 different machine learning classifiers for this task. They used LR, LDA, k-NN, classification and regression tree (CART), Naive Bayes (NB), SVM, random forest, extremely randomized forests, bagging and gradient boosting. The last four achieved the best results as reported in Table 4. The dataset used by the authors and provided by Chainalysis 12 is limited and facing the same problem of substantial undersampling of some of the 12 categories like stolen-bitcoins, ransom-ware or mixing.
To detect Ponzi schemes automatically, Bartoletti et al. [52] constructed a dataset of real-world Ponzi schemes by analyzing the Bitcoin blockchain transactions used for scams through a manual search on Reddit and bitcointalk.org, they were able to find a list of 32 Ponzi schemes for which advertisers in the forums present them as high-yield investment programs (HYIP), or as gambling games. Then, they collected the deposit addresses for these schemes through manual search in the forum and on their websites. They extended the number of addresses through address clustering and multi-input heuristic. To address the well-known class-imbalance problem in this task, they used different under-sampled sets and different cost-matrix weights. Formalizing the problem as a binary classification problem for an address to be either Ponzi-related or non-Ponzi related, they evaluated three different types of classifiers: repeated incremental pruning to produce error reduction (RIPPER) which is a rule-based technique, Bayes network and random forest. The best classifier was random forest which correctly classified 31 Ponzi schemes out of 32. For Ponzi-schemes detection in Ethereum, Jung et al. [53] used J48 (decision tree algorithm), random forest and stochastic gradient descent (SGD) for classification. HYIP classification has been addressed in [54] using a dataset with a total of 2,134 HYIP addresses. Toyoda et al. [54] used random forest (RF), gradient boosting implementation (XGBoost), ANN, SVM and k-NN for binary classification of HYIP and non-HYIP addresses. Random forest achieved the best results based on 7 features characterizing the transactions. 13 https://goo.gl/CvdxBp A summarized comparison for the aforementioned reviewed research work is presented in Table 4. The common thing that can be obviously seen very challenging in this kind of problem is the lack of a reliable labeled dataset of reasonable size available for researchers. Even studies that used the Chainalysis dataset still face the problem of dealing with the high class-imbalance problem. Except for [50], which combined semi-supervised and supervised techniques, other efforts [51]- [54] solely relied on supervised techniques. The high costs of manual labeling as done in [52] and the small size of the labeled datasets for fraudulent addresses suggest we need to explore using semi-supervised learning techniques for fraud detection in a way similar to [55].

E. ANONYMITY AND PRIVACY
Privacy and anonymity are two necessary aspects for online financial trading. Anonymity is mostly favored by criminals to hide their identities when dealing illegally for drugs or weapons or being involved in money laundering transactions. However, it is also preferred by privacy-savvy people who want to keep their identities and transactions anonymous and private. Privacy means protecting the data of transacting users including the traded amount, the transacting parties, their balances and the timing of the transaction.
Trying to reveal the identities of Bitcoin users and linking their Bitcoin addresses and trades usually rely on using public data information from social media or other publicly available data in a process called ''deanonymization''. It is either based on heuristics to link this data to the blockchain transactions as in [56]- [59], or it can be based on AI techniques. Deanonymization has been approached using AI in two ways; clustering [60] or classification [61], [62] and [63]. Ermilov et al. [60] used off-chain information (e.g. twitter and walletexplorer.com) together with the blockchain information based on common spending and one time change heuristics for address clustering. They used a probabilistic framework to assign an address to a cluster based on maximizing the log-likelihood function with six clusters of entities: mining pools, exchanges, darknet markets, mixers, gambling and other services. The authors in [61] and [62] considered a particular pattern of 2-motif and 3-motif features as a potential laundering pattern used in the classification model based on the pattern of acquisition and spending of Bitcoin in the dataset. They derived an entity-transaction graph from the address-transaction graph. Additionally, features like betweenness, closeness, in-degree, out-degree, PageRank and load centrality over a week, a month and a year were used. With other temporal features; they proposed a decision tree method with gradient boosting and compared the results against a logistic regression algorithm. This classification problem faces the entity-category class imbalance between Service category and the Mining Pool category for example.
Gradient boosting classifier (GBC) achieved the best results in [63] to classify a Bitcoin address into one of ten categories. They used synthetic minority over-sampling technique (SMOTE) to oversample the two minority classes hosted-wallet and mixing to overcome the class imbalance problem. Modeling the problem as a classification problem as well, Lin et al. [64] proposed a different set of features including moments of transaction time in higher order to train different supervised machine learning models (LR, SVM, RF, AdaBoost, LightGBM, ANN, etc.) on a labeled category data set. Researchers in [65], used cascading of machine learning models to enrich entities' information with data from previous classifications. This enhanced the overall classification performance using 34 features for initial classification. They utilized three different models; Adaboost, random forest and gradient boosting.
Different from all the above research work reviewed, Juhász et al. [66] did not rely on labeled data for Bitcoin addresses classification. They monitored Bitcoin network messages through 140 nodes distributed over the network to bind Bitcoin transactions to geographical locations. The monitoring agents watched out for clients relaying transactions during the first time segment; estimated to be 2 sec. The client originating the transaction is possibly one of those agents. A comparison between different studies, the datasets used and the techniques tested are listed in Table 5. It can be seen that most of the studies relied on supervised techniques, except for [60], which used a semi-supervised method combining clustering with labels from different public sources.

F. CRYPTOCURRENCY MINING
The mining process has the disadvantage of high electricity consumption used by mining pools for participating in the PoW computations. Only one miner succeeds to add a block of transactions, while other mining pools are left with the expenses of huge energy costs. This disadvantage threatens the decentralization of the cryptocurrency and makes it susceptible to monopolization, especially when the block reward will vanish over time due to Bitcoin block reward halving. Some researchers [68] theoretically proposed using deep-learning tasks as a PoW to let the electricity be consumed in useful tasks. A coin is rewarded when a miner exceeds a minimum threshold for performance. They also proposed a proof-of-storage mechanism to store the deep learning models on distributed nodes called keepers which are also to be rewarded as per the proposed model for keeping secure storage for the models. While the idea of saving the electricity for useful operations seems beneficial, yet the proposed model ignored some important aspects. Among them is the required security and protection for the training and validation data. The challenge is how to protect the data that must be shared with different untrusted miners in order to solve the problem, as proposed in the model. A second issue is the time for adding a block since some deep-learning tasks may take days for training a model. The Bitcoin block adding time is already criticized by people in the domain as it is greatly limiting the transactions' rate, but it is needed for properly synchronizing the blockchain. Also deep-learning problems and their training time depend on the training set size. The authors did not mention how their proposed model could handle these issues.
Confirmation time for transactions depends on various factors in the mining process and the network. Singh et al. [69] addressed the confirmation time prediction for Ethereum blockchain. For this task, they used the dataset for Ethereum transactions until November 2018 to get a set of features including the transactions count done by the sender, the sender's gas, gas price, gas used, the timestamp for sending the transaction (calculated from the pending transaction pool) and the transaction's block timestamp. They formulated the problem as a classification problem with eight categories depending on the duration of confirmation of the transaction within (15 s, 30 s, 1 min, 2 min, 5 min, 10 min, 15 min, 30 min and longer). They used SMOTE to address the class imbalance problem as most of the transactions are confirmed within 15s. They compared three models; Naïve Bayes, random forest and MLP according to accuracy, null-accuracy and Cohen's Kappa score to account for the imbalanced nature of the data. They found that MLP achieved the best accurate results.
Additionally, Feng et al. [70] proposed a Markov model to model and analyze a selfish mining strategy in Ethereum. They viewed the PoW mining process as a series of Bernoulli trails that independently search for a nonce in order to generate a new block. They found that the computational power threshold which makes selfish mining profitable in Ethereum is lower than that in Bitcoin mining. This makes Ethereum more vulnerable to 51% attack. They suggested designing new reward functions to allow miners maximizing their profits through a more secure and honest strategy.
Game-theoretic analysis has also been used in [71] to prove the importance of block reward in mining to keep the blockchain secure since the transaction fee model could encourage selfish mining. Another study [72] used game theory for analysis of some malicious mining strategies like block withholding (BWH).
It can be concluded that ideas using AI techniques in the mining process to replace solving the crypto-puzzle in the PoW, or entirely replace the PoW by an AI-based consensus mechanism, have not been thoroughly investigated and evaluated. AI techniques can be employed by mining pools to choose which cryptocurrency to mine and which mining pool to join in order to reduce the electricity consumption and increase their profit based on historical data. A study done in [73] used prospect theory in comparison with utility theory to predict the profitability of a miner. They learned from data obtained from mining with 5 pools (AntPool, F2Pool, BTC.com, SlushPool and BatPool) for 40 consecutive days using AntMiner S5. The data included parameters related to the mining pools (e.g. hash distribution and reward sharing method) and other parameters specific to the miner (e.g. its hash rate and electricity cost) in addition to the current value of the currency and the value of the block reward. They concluded that their prospect theoretic approach predicted their profits more accurately than the expected utility approach.

G. SECURITY
Despite the security and privacy properties that exist in blockchain-based cryptocurrencies which were surveyed in [74], there are several security threats that are facing the cryptocurrency ecosystem [75]. They can be classified as attacks on the distributed network, mining process attacks, double spending and transaction malleability attacks. There are also client-side security attacks and privacy threats to wallet, exchange or escrow services [58]. In this paper, we only focus on research papers related to security that rely on AI techniques.
Johnson et al. [76] used game-theoretical models of competition between two mining pools of varying sizes to find the trade-off between mining strategies. Triggering a distributed VOLUME 8, 2020 denial-of-service (DDoS) attack to lower the chance that a competing mining pool wins in solving the crypto-puzzle and adds a block to the chain. They considered differences in costs of both investment and attack, as well as uncertainty of the success of a DDoS attack. By analyzing the game's equilibria, they found that pools have a greater incentive to attack large pools than small ones. It was also concluded that larger mining pools have a greater incentive to attack than smaller ones.
In a different context, DDoS attack detection in Bitcoin-related services (e.g. mining pools, currency exchanges, e-Wallet, gambling services) has been studied in [77]. Johnson et al. used MLP trained with features based on data collected in [78] and blockchain blocks and transactions to detect DDoS attacks. Blocks were labeled as either ''DDoS'' or ''nonDDoS'' to reflect whether the block was created on the day the DDoS attack occurred. The inadequacy of the tested model with its low accuracy and some limitations are reported in the paper.
A cryptocurrency network is more vulnerable to a 51% attack [75] if selfish miners controlled more than a certain threshold of computational hash power. Selfish mining behavior has been modeled by a Markov-model and analyzed in [70] for Ethereum as discussed in the last section. Selfish mining poses a serious threat to cryptocurrencies adopting PoW. Another type of attack called block with-holding (BWH) has been analyzed in [79] based on the work done in [72]. In a BWH attack, a pool of miners sends a share of its mining power to another pool and does not announce any PoW solutions it finds thus ''withholding'' them while still collecting the shared reward generated by other non-attacking miners. Consequently, the BWH attack lowers the effectiveness of the victim pool while increasing the effectiveness of the attacker's pool. Eyal et al. [72] considered BWH as a rational behavior that is profitable for the attacker. Profit analysis for a realistic and complex BWH attack scenario was done in [79] using game theory to derive a mathematical representation for BWH attacks. The analysis revealed that pools attacking each other can reach a nash equillibrium and that largest pools benefit from BWH while smaller pools lose if there is an attack so they have to attack to maximize their profits. The smallest pools, however, are better not to attack in any scenario. In a similar fashion, Li et al. [80] analyzed the nash equillibrium of the mining process through numerical simulations exploring the influence of the mining pools' power, the ratio of the power to be infiltrated, and the betrayed rate of dispatched miners.
Caporale et al. [81] used a Markov-switching non-linear specification to analyze the effects of cyber attacks on returns in the case of four cryptocurrencies (Bitcoin, Ethereum, Litecoin and Stellar) over the period August 2015 to February 2019. In addition to the daily prices data and the VIX data obtained from the Federal Reserve of St.Louis., they used the data source for cyber attacks from Hackmageddon. 14 They included not only the crypto attacks targeting cryptocurrencies, but also other cyber attacks as they see that the media coverage for these attacks could also affect the investors' perception of cryptocurrencies which rely on cyber security. The results suggest significant negative effects of cyber attacks on the probability of cryptocurrencies staying in the low volatility regime. This work can be seen as statistical learning from data which can further be used for price prediction after the occurrence of cyber attacks.
The aforementioned research for security analysis either used supervised machine learning models or game-theory techniques. Some other recent ML solutions and proposals to address the problem of detecting suspicious activities in Bitcoin and blockchain were surveyed in [82]. Some of the referenced work are better categorized as fraud detection or anonymity and deanonymization and we have already covered them in the previous subsections.

IV. DISCUSSION AND POSSIBLE FUTURE RESEARCH DIRECTIONS
Technology advances have impacted the cryptocurrencies evolution by creating new ways to mine new coins, store the blockchains over distributed nodes, secure the network and analyze the huge amount of trades and blockchain transactions that are beyond human capabilities. In this study, we presented a survey for the state-of-art research that makes use of artificial/machine intelligence techniques to address the challenges facing cryptocurrencies.
The AI research studies addressing Bitcoin are remarkably more than those researching other altcoins as seen in Table 6. The possible dependencies between cryptocurrencies' prices should be further identified. The possibility of using AI techniques to address security, anonymity and privacy level of other cryptocurrencies is recommended for further exploration as security and privacy are major and critical concerns for traders to gain more trust while trading.

A. NOTES ON PRICE PREDICTION
Although this topic is the most studied among other topics using AI to tackle cryptocurrency issues, there is still room for more research on applying AI techniques for cryptocurrency price predictions in new contexts. Most of the papers predicted Bitcoin prices in USD but few papers cover price prediction of other altcoins with other fiat currencies. Conducted research relied mostly on the cryptocurrency price history indicators such as open, high, low and closing prices, while few studies take advantage of different sources of social media, online metrics and other stock markets indicators. Among the used social media sources are tweets and their sentiments, Reddit posts, Wikipedia views, and Google Trends data. Few research efforts considered using BitcoinTalk forum posts. Other news sources, such as newspapers and news agencies have not been taken into account, although such sources can shape the opinion of some novice investors and influence users' buying or selling behaviour. Technical news about security breaches or instability of the cryptomarket might affect the price as well. Moreover, almost all the studies depend merely on posts and content in the English language for their analysis while investors from all over the world contribute to the cryptocurrency market.
The results of research efforts in price prediction depended on different datasets with features at different time periods. Therefore, the results can not be fairly compared to reach a conclusion for recommending or favoring one price prediction model over another. Tree-based models and probabilistic-based models were the least models to be tested. Probabilistic-based models are better to be investigated in more depth to model the uncertainty in the domain of cryptocurrencies. Introduction of some sort of trust or confidence score measure for the prediction accuracy or performance of the model to account for the uncertainty and missing factors or explanatory variables is recommended. Nonlinear tests and techniques listed in [34] have not yet been thoroughly explored for application on cryptocurrencies time series and need further investigation to capture the non-linear dependencies on the explanatory variables.

B. NOTES ON VOLATILITY PREDICTION
Volatility prediction has been mostly approached using GARCH model variants. GARCH models are preferred by financial experts because they provide a more real-world context to predict the prices and financial returns. Most of the volatility prediction research was conducted by finance researchers using GARCH variants and was based on historical prices. Only [39] explored other techniques but with only the past values of the realized volatility. No volatility prediction research took advantage of social media and news metrics that can give an estimate of the user adoption and interest in the cryptocurrency market. Investors classification [49] and estimation of the size of short-term traders cluster that shows herd behavior can be seen to directly affect the volatility of Bitcoin price and need to be further investigated. Additionally, [36] was able to combine a regression technique with GARCH and the results were promising. There is a need for additional research efforts to combine other regression techniques and to use different indicators.

C. NOTES ON AUTOMATED TRADING
There are many online commercial trading bots currently available that apply price and volatility prediction techniques and portfolio trading strategies for portfolio management that were reviewed in section III-B. Most of the portfolio trading strategies research is based on the portfolio construction strategies used for traditional financial assets. We believe there is still a room in this area to learn the best strategy for trading of cryptocurrencies that can adapt dynamically to new ICOs and take into account the behavior of different clusters of investors. The portfolio construction may be also approached using game theory approaches with the design of a proper payoff.

D. NOTES ON FRAUD DETECTION
Fraud detection research suffered from the unavailability of sufficient reliable datasets. The class imbalance problem is a challenge facing fraud detection since only a few addresses are marked as fraudulent. Different oversampling and undersampling approaches to address the class imbalance problem need to be investigated in the domain of cryptocurrencies. Semi-supervised techniques need to be investigated as they can be a way for learning from a small labeled dataset while having many unlabeled examples. AI solutions for other types of a scam like fake ICOs and pump-and-dump schemes have not been examined as well.

E. NOTES ON DEANONYMIZATION
Clustering techniques need to be further investigated for their ability to cluster addresses based on the patterns of exchanges between addresses. This can help to regulate authorities to spot addresses suspected for money-laundering or other illegal behavior. Additionally, this can help in investor classification and in gaining more insights about the cryptocurrency market dynamics to develop better trading strategies. Furthermore, most of the deanonymization research was done for Bitcoin [59]. Deanonymization of other cryptocurrencies remains to be explored as well.

F. NOTES ON MINING
The sharp drop in the Bitcoin price after the 2017 hype, together with the increased difficulty of mining a new block and the uncertainty about what might happen when reaching the maximum limit of Bitcoins, create an environment where mining becomes less profitable and unpredictable than in the past. This creates a serious risk that impacts the trust in cryptocurrencies. This urges miners to employ data analysis for mining in order to implement new mining strategies that predict profit based merely on transactions fees as income, and ignore block reward as a major source of income. The mining strategy was best modeled using game theoretic approaches. However, miners' data of total computation power and electricity consumption is not available. The mining research work reviewed for modifying the consensus protocol or the PoW puzzle to be solved is still immature and requires further investigation and more concrete evidence of effectiveness.

G. NOTES ON SECURITY
It is thought that the data of cryptocurrencies' network events can hold significant information about miners, their devices and their network joining and leaving patterns. AI techniques can help detect attacks or suspicious activities on the network based on this data. This direction has not been explored yet. One of the reasons for that is the unavailability of a dataset for attacks and suspicious activities to use for learning. Building big labeled datasets for security attacks is an expensive task. This suggests semi-supervised learning as a good candidate to solve this kind of problem as long as the assumptions for semi-supervised techniques are met.

V. CONCLUSION
In summary, this survey navigates through and organizes the vast amount of diverse research work that applies AI techniques in the field of cryptocurrencies. The state-of-art research efforts were classified into six classes. For each class, a comparison of different research work according to the used techniques and datasets was provided. We highlighted possible research gaps and open directions that require future development in this highly dynamic field. Although we have not cited all the research papers in the field, yet we did our best to cite recent papers that investigated a wide spectrum of different AI techniques to tackle different challenges. This survey can greatly help researchers interested in the application of AI and machine learning techniques in the field of cryptocurrencies. It gives them a quick, yet full, overview of this multidisciplinary area; through presenting simplified reviews of some of the research done in this area and the used techniques while listing some of the available datasets they used to address the different cryptocurrencies challenges.